>> x=-6:0.001:6; >> y=-6:0.001:6; >> [X,Y]=meshgrid(x,y); >> phi=x.*y-y; >> contour(x,y,phi) Error using contour (line 48) Z must be at least a 2x2 matrix.

 Akzeptierte Antwort

madhan ravi
madhan ravi am 10 Sep. 2018
Bearbeitet: madhan ravi am 10 Sep. 2018

1 Stimme

EDITED
x=linspace(-6,6,1000);
y=x;
[X,Y]=meshgrid(x,y)
phi=X.*Y-Y
contour(X,Y,phi)

5 Kommentare

madhan ravi
madhan ravi am 10 Sep. 2018
If it works please accept the answer.
cstibbards
cstibbards am 10 Sep. 2018
Matlab froze when I typed this in, it hasn't worked yet.
madhan ravi
madhan ravi am 10 Sep. 2018
Bearbeitet: madhan ravi am 10 Sep. 2018
Now try the edited code it worked for me.
madhan ravi
madhan ravi am 10 Sep. 2018
did it work @cstibbards?
cstibbards
cstibbards am 10 Sep. 2018
Not yet, but I think its an issue with my computer running Matlab, not the code. Thanks.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by