Make unit vectors at equal angles without for loop

13 visualizaciones (últimos 30 días)
Lavika Singh
Lavika Singh el 15 de Jun. de 2022
Comentada: Sam Chak el 15 de Jun. de 2022
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 comentarios
KSSV
KSSV el 15 de Jun. de 2022
Any pictorial example?
Sam Chak
Sam Chak el 15 de Jun. de 2022
@Lavika Singh, can you show the equal angle formula?

Iniciar sesión para comentar.

Respuestas (1)

Star Strider
Star Strider el 15 de Jun. de 2022
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
.

Categorías

Más información sobre Mathematics en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by