Effacer les filtres
Effacer les filtres

Plotting curves requires 1 parameter

7 vues (au cours des 30 derniers jours)
lo
lo le 17 Mar 2014
For the code below, I want to plot a x against H graph trying to find the minimal of H, so I wrote
ezplot(x,H)
And there is an error "Plotting curves requires 1 parameter." What is the correct code to solve this problem?
Here is the code:
O=[706;524;1072]
D=[1049,1142,766]
c=[7 12.4 19.9;12.4 7 19.1;19.9 19.1 7]
syms x
f=c.^-x
syms A1 A2 A3 B1 B2 B3
A=[A1;A2;A3]
B=[B1,B2,B3]
j=1:3;
A1=(sum(D(j).*f(1,j)))^-1;
A2=(sum(D(j).*f(2,j)))^-1;
A3=(sum(D(j).*f(3,j)))^-1;
i=1:3;
B1=(sum(A(i).*O(i).*f(i,1)))^-1;
B2=(sum(A(i).*O(i).*f(i,2)))^-1;
B3=(sum(A(i).*O(i).*f(i,3)))^-1;
for i=1:3
for j=1:3
T(i,j)=A(i).*B(j).*O(i).*D(j).*f(i,j)
end
end
for i =1:3
y(i)=sum(T(i,:))
end
for i =1:3
z(i)=sum(T(:,i))
end
for i =1:3
F(i)=(sum((y(i)-O(i))^2))+(sum((z(i)-D(i))^2))
end
H=sum(F)

Réponses (0)

Catégories

En savoir plus sur Graph and Network Algorithms dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by