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 CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by