pol2cart in loop and pre-allocating
Mostrar comentarios más antiguos
hi all,
how can I put [x,y,z]=pol2cart(theta,rho,z), in tripple loop for different values of heta,rho,z, as well how to pre allocate [x,y,z]?
Regards
Respuesta aceptada
Más respuestas (1)
David Hill
el 9 de Jun. de 2020
No need for loop or for preallocating when you just execute for arrays of theta,rho, and Z.
theta=linspace(0,pi,100);
rho=linspace(0,10,100);
Z = linspace(10,100,100);
[x,y,z]=pol2cart(theta,rho,Z);
Categorías
Más información sobre Performance and Memory en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!