Make unit vectors at equal angles without for loop

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 Commenti

Any pictorial example?
@Lavika Singh, can you show the equal angle formula?

Accedi per commentare.

Risposte (1)

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
.

Categorie

Scopri di più su Mathematics in Centro assistenza e File Exchange

Richiesto:

il 15 Giu 2022

Commentato:

il 15 Giu 2022

Community Treasure Hunt

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

Start Hunting!

Translated by