Plot Vectors 3D

13 ビュー (過去 30 日間)
Kaden
Kaden 2018 年 8 月 21 日
コメント済み: Kaden 2018 年 8 月 22 日
Hi,
I am looking to plot 3 vectors with x,y,z components. I have tried the quiver function but havent had any luck. How can I go about plotting these vectors on the same plot?
Edit: I would like the vectors to be represented by a line, not just a point.
Thanks!
Vectors:
Vector_1 = (-0.0169 0.2023 0.9791);
Vector_2 = (0.6371 -0.7526 0.1667);
Vector_3 = (0.7706 0.1667 -0.1163);

採用された回答

Walter Roberson
Walter Roberson 2018 年 8 月 21 日
plot3(first(:,1), first(:,2), first(:,3), 'k*-', second(:,1), second(:,2), second(:,3), 'b^-', third(:,1), third(:,2), third(:,3), 'g>-');
legend(('first', 'second', 'third'})
  4 件のコメント
Walter Roberson
Walter Roberson 2018 年 8 月 22 日
Kaden
Kaden 2018 年 8 月 22 日
That worked! Thank you!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by