How do I plot a contour map in Matlab?

13 次查看(过去 30 天)
>> 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.

采纳的回答

madhan ravi
madhan ravi 2018-9-10
编辑:madhan ravi 2018-9-10
EDITED
x=linspace(-6,6,1000);
y=x;
[X,Y]=meshgrid(x,y)
phi=X.*Y-Y
contour(X,Y,phi)
  5 个评论
cstibbards
cstibbards 2018-9-10
Not yet, but I think its an issue with my computer running Matlab, not the code. Thanks.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by