필터 지우기
필터 지우기

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 CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by