フィルターのクリア

plotting concentric circles using contour

9 ビュー (過去 30 日間)
Randy Chen
Randy Chen 2020 年 10 月 26 日
コメント済み: Star Strider 2020 年 10 月 27 日
I'm trying to plot a few concentric circles with the following codes, but what I get is an ellipse, i don't know why:
[x,y] = meshgrid(-3:0.1:3,-3:0.1:3);
z = x.^2+y.^2;
contour(x,y,z)

採用された回答

Star Strider
Star Strider 2020 年 10 月 26 日
Use the axis function, specifically either:
axis('equal') % Function Expression
or:
axis equal % Command Expression
.
  5 件のコメント
Randy Chen
Randy Chen 2020 年 10 月 27 日
thanks a lot!
Star Strider
Star Strider 2020 年 10 月 27 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by