Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Plot with matrices - surfaces

1 回表示 (過去 30 日間)
JRC
JRC 2016 年 10 月 11 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 = [-5 -1 0 -2 5];
c1 = [1 2 3 5 2]; c2 = [1 1 -1 4 0];
figure (1)
k = 1: 1 t + 1;
Plot3 (k-1, a1, k-k + 1 'k * -, k-1, a2, k, k + 1' k * -, k-1, b 1, k, k + 0.5, 'b * -, k-1, b2, k, k + 0,5,' b * -, k-1, c1, k 0 + k 'r * -, k-1, c 2, k 0 + k '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 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.
  1 件のコメント
Massimo Zanetti
Massimo Zanetti 2016 年 10 月 11 日
Fix line with plot3 and reupload the code.

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by