Plot surfaces with matrices
1 回表示 (過去 30 日間)
古いコメントを表示
I have the informations and I did the graphic using the commands:
t=4;
a1=[1 2 8 9 12]; a2=[1 2 8 9 12]; b1=[-2 0 2 7 8]; b2=[2 4 10 12 15]; c1=[-5 -1 1 5 7]; c2=[3 5 11 13 15];
figure(1)
k=1:1:t+1;
plot3(k-1,a1,k-k+1,'k*-',k-1,a2,k-k+1,'k*-',k-1,b1,k-k+0.5,'b*-',k-1,b2,k-k+0.5,'b*-',k-1,c1,k-k+0,'r*-',k-1,c2,k-k+0,'r*-')
xlabel('k')
ylabel('x_1')
zlabel('\alpha')
legend('(\alpha=1)','(\alpha=1)','(\alpha=0.5)','(\alpha=0.5)','(\alpha=0)','(\alpha=0)')
I wanted a surface and not a graphic 3D. The surface would be built connecting the points (making planes) which would give a "triangle" over the period k.
I tried to use the comands "mesh" or "surf" or "stem3" of matlab but did not work.
Thanks.
0 件のコメント
回答 (1 件)
KSSV
2016 年 10 月 20 日
Surf gives you squares. If you want triangles you have to check Delaunay ...
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!