How do I plot a contour map in Matlab?

14 ビュー (過去 30 日間)
cstibbards
cstibbards 2018 年 9 月 10 日
コメント済み: cstibbards 2018 年 9 月 10 日
>> 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 件のコメント
madhan ravi
madhan ravi 2018 年 9 月 10 日
did it work @cstibbards?
cstibbards
cstibbards 2018 年 9 月 10 日
Not yet, but I think its an issue with my computer running Matlab, not the code. Thanks.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by