2次元および3次元で​終端に矢印を持つライ​ンを表示できますか?

29 views (last 30 days)
MathWorks Support Team
MathWorks Support Team on 19 Aug 2010
終端に矢印が付いているラインを表示する方法を教えてください。

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 25 Mar 2023
Edited: MathWorks Support Team on 27 Mar 2023
2次元であれば、QUIVER, 3次元であれば、QUIVER3 関数を使用できます。
- 2 次元プロット
p1 = [1 1]; % 始点
p2 = [5 5]; % 終点
quiver(p1(1), p1(2), p2(1)-p1(1), p2(2)-p1(2), 0)
- 3 次元プロット
p1 = [1 1 1]; % 始点
p2 = [5 5 5]; % 終点
quiver3(p1(1), p1(2), p1(3), p2(1)-p1(1), p2(2)-p1(2), p2(3)-p1(3), 0)
なお、ユーザコミュニティである MATLAB Central には、矢印を描画するプログラムが公開されています。
・MATLAB Central: Arrow3 Version 5
ただし、MATLAB Central においてフリーで公開されているファイルの内容に関しましては、直接プログラム作成者の方にお問い合わせください。

More Answers (0)

Categories

Find more on 2 次元および 3 次元プロット in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!