plotting sphere and rectangle mesh
22 次查看(过去 30 天)
显示 更早的评论
need help on plotting something like this :
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/151519/image.png)
any idea ?
0 个评论
采纳的回答
Azzi Abdelmalek
2015-6-23
编辑:Azzi Abdelmalek
2015-6-23
sphere(20)
axis square
You can get the coordinates x,y and z
[x,y,z]=sphere(20)
You can plot a sphere
surf(x,y,z)
4 个评论
Azzi Abdelmalek
2015-6-23
编辑:Azzi Abdelmalek
2015-6-23
ii=-1:0.1:1
jj=-1:0.1:1
[ii1,jj1]=meshgrid(ii,jj)
surf(ii,jj,zeros(size(ii1)))
hold on
sphere(20)
更多回答(0 个)
另请参阅
类别
在 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!