
How to plot three dimensional triangular based pyramid?
12 次查看(过去 30 天)
显示 更早的评论
I want to plot a 3d triangular based pyramid in Matlab. In 2d it's basically an equilateral triangle. Shall I need to write an equation for each faces individually?
How can I plot it?
Thanks in advance.
0 个评论
采纳的回答
darova
2020-6-30
Here is the way
[x,y] = pol2cart(deg2rad(0:120:360),1);
x1 = [x*0; x; x*0];
y1 = [y*0; y; y*0];
z1 = [x*0+1; x*0; x*0];
surf(x1,y1,z1)
axis vis3d

更多回答(1 个)
另请参阅
类别
在 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!