フィルターのクリア

Plotting a set of unit vectors in 2-D

2 ビュー (過去 30 日間)
bio lim
bio lim 2015 年 10 月 22 日
コメント済み: Star Strider 2015 年 10 月 22 日
I am trying to figure out what is the best way to plot a set of unit vectors in 2-D anchored at (0,0). I am defining my rotational matrix (R) as follows.
R = [cosd(theta) -sind(theta); sind(theta) cos(theta)];
The angle of rotation is from 0 to 2pi such that it forms a unit circle. I also would rather use the regular plot command over plotv or quiver. Anyone has any suggestions?
Thanks.

採用された回答

Star Strider
Star Strider 2015 年 10 月 22 日
I’m not exactly certain what you want to do. I would do what you described with this:
a = linspace(0, 2*pi, 10);
r = 1;
x = r*cos(a);
y = r*sin(a);
o = zeros(size(a));
figure(1)
plot([o' x']', [o' y']')
axis equal
  2 件のコメント
bio lim
bio lim 2015 年 10 月 22 日
Great way. Thanks. I was just meddling with random problems.
Star Strider
Star Strider 2015 年 10 月 22 日
My pleasure.
That was fun to program!

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

その他の回答 (0 件)

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by