Creating Polar mesh in matlab
107 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
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 个)
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!