フィルターのクリア

Creating Polar mesh in matlab

113 ビュー (過去 30 日間)
Reza Lashani
Reza Lashani 2021 年 1 月 13 日
編集済み: Reza Lashani 2021 年 1 月 13 日
I want to plot a surface z = f(x,y) and it is desired to plot it on a circle surface. Is it possible in matlab or can create polar mesh on matlab?

採用された回答

David Goodmanson
David Goodmanson 2021 年 1 月 13 日
編集済み: David Goodmanson 2021 年 1 月 13 日
Hi Reza,
% make a rectangular grid of r and theta,
% then define x and y in the usual way
rr = 0:1:20;
thth = (0:.05:1)*2*pi;
[r th] = meshgrid(rr,thth);
x = r.*cos(th);
y = r.*sin(th);
z = 1 + x.^2 - y.^2;
surf(x,y,z)
  1 件のコメント
Reza Lashani
Reza Lashani 2021 年 1 月 13 日
編集済み: Reza Lashani 2021 年 1 月 13 日
Thanks david. It helped me so much.

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

その他の回答 (1 件)

Cris LaPierre
Cris LaPierre 2021 年 1 月 13 日
See this answer on how to do this using a rectangular matrix
See this blog post for how to do this with polar coordinates.
  1 件のコメント
Reza Lashani
Reza Lashani 2021 年 1 月 13 日
編集済み: Reza Lashani 2021 年 1 月 13 日
Thank you cris. These articles was very useful to me.

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

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by