Plotting a triangle from 3 3x1 matrices

3 ビュー (過去 30 日間)
alex morris
alex morris 2022 年 9 月 19 日
編集済み: Matt J 2022 年 9 月 19 日
Hello,
So I am trying to create a plot of a triabgle from three matrices a = [5; 8; 13]; b = [-5; 7; 21]; c = [12; -32; 0]; . I have used plot3 for every possible combination of vectors a, b, and c and well as every possible combination of their transposes and only seem to get two lines. Are there any other plotting methods I should try?
Thank you
  3 件のコメント
alex morris
alex morris 2022 年 9 月 19 日
yes they are the vertices
Matt J
Matt J 2022 年 9 月 19 日
編集済み: Matt J 2022 年 9 月 19 日
Then see my answer below, and tell us if it works.

サインインしてコメントする。

採用された回答

Matt J
Matt J 2022 年 9 月 19 日
編集済み: Matt J 2022 年 9 月 19 日
a = [5; 8; 13]; b = [-5; 7; 21]; c = [12; -32; 0];
V=num2cell([a,b,c,a],2);
plot3(V{:},'-o', MarkerFace='r');
xlabel x; ylabel y; zlabel z; grid on

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by