Make unit vectors at equal angles without for loop

13 ビュー (過去 30 日間)
Lavika Singh
Lavika Singh 2022 年 6 月 15 日
コメント済み: Sam Chak 2022 年 6 月 15 日
Can you help me unit vectors at equal angles to each other without using for loops. I just want to use linspace and plot or maybe any other simple command
  2 件のコメント
KSSV
KSSV 2022 年 6 月 15 日
Any pictorial example?
Sam Chak
Sam Chak 2022 年 6 月 15 日
@Lavika Singh, can you show the equal angle formula?

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

回答 (1 件)

Star Strider
Star Strider 2022 年 6 月 15 日
Possibly —
a = linspace(0, 2*pi, 7);
r = 1;
x = r*cos(a);
y = r*sin(a);
zv = zeros(size(a));
figure
plot([zv; x], [zv; y])
axis padded
axis equal
figure
quiver(zv, zv, x, y)
axis padded
axis equal
.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by