Face Error "Input arguments must be numeric or objects which can be converted to double' while plotting Contour

 Risposta accettata

contour(x1,x2,S11(x1,x2))

6 Commenti

S11 =@(x1,x2)(262144*x2.*((25*x1.^2)/2-75000*x1+75000000))/5592405333333333
Use element wise power and multiplication in expression
S11 = @(x1,x2)(262144.*x2.*((25.*x1.^2)/2 - 75000.*x1 + 75000000))/5592405333333333;
x1=0:6000;
x2= 0:800;
contour(x1,x2,S11(x1,x2))
% Hello VBBV Thanks for answering i implemented your code but its does not work
% Now I am Getting This Error "Arrays have incompatible sizes for this operation."
% I also implemented the fallowing code but this time the error appeared as "Z must be at least a 2x2 matrix."
S11 = @(x1,x2)(262144.*x2.*((25.*x1.^2)/2 - 75000.*x1 + 75000000))/5592405333333333;
for x1=0:6000;
for x2= 0:800;
S11(x1,x2)= contour(x1,x2,S11(x1,x2))
end
end
use meshgrid function
S11 = @(x1,x2) (262144*x2.*((25*x1.^2)/2-(75000*x1)+75000000))/5592405333333333;
x1=0:6000;
x2= 0:800;
[X1 X2] = meshgrid(x1,x2);
contour(X1,X2,S11(X1,X2))

Accedi per commentare.

Più risposte (0)

Categorie

Prodotti

Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by