Simple 3D vector plotting

471 ビュー (過去 30 日間)
Itun
Itun 2012 年 3 月 1 日
コメント済み: Stefanos 2022 年 12 月 14 日
I need to make a 3D drawing.
3D drawing consists of:
1 vectors,
2 lines,
3 arcs for angle between two vectors or lines vector,
4 vector, line, arc labels.
Label requirements:
1 Greek symbols (phi, alpha, theta, ...)
2 showing a fraction ability (phi/2)
3 font style such as italic, bold, ...
Can somebody write a snippet of code for me, because I am newbie at matlab, it will be very helpful? Can you please write a code which display two 3D vectors with labels (letter and low index) and angle between them (arc with label "phi/2"). Thanks in advance.

回答 (1 件)

Patrick Kalita
Patrick Kalita 2012 年 3 月 8 日
You're asking quite a lot there. Here are a few functions that will get you going in the right direction:
  • For drawing vectors in 3D, you'll probably want to use quiver3. The x, y, and z inputs represent where you want the base of the vector to be drawn and the u, v, and w inputs represent the three components of the vector.
  • For drawing straight lines and arcs use line. See the documentation for examples of how to use it.
  • For adding labels use text. Again, the documentation has useful examples.
  1 件のコメント
Stefanos
Stefanos 2022 年 12 月 14 日
How can I draw a single 3d vector. Cause quiver 3 gives multiple vectors in the 3d plane

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

カテゴリ

Help Center および File ExchangeLabels and Annotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by