u = (0:1500).*(96*(2*pi)/1500); % spiral with 96 waves
r=u./2; % spiral radius
x=r.* cos(u); % X
y=r.* sin(u); % Y

 Respuesta aceptada

Ameer Hamza
Ameer Hamza el 14 de Nov. de 2020
Editada: Ameer Hamza el 14 de Nov. de 2020

0 votos

Your code is already pretty optimized. However, you can replace the first line with
u = linspace(0, 96*2*pi, 1501)
I think this line is more readable compared to the one in your code.

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 14 de Nov. de 2020

Comentada:

el 14 de Nov. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by