What kind of loop for this equation?
Mostrar comentarios más antiguos
Hii, In a part of my calculation i have cos (theta) /L. Theta ranges from 0 to 360 deg and L ranges from 300 to 800. But i need a calculation of l=300 ranging from0 to 360 deg,L=301 ranging from 0 to 360 deg............... L=800rangin from 0 to 360 deg.this matrix kind of calculation brings wrong loop for me.could anyone help in this regard?!
Respuesta aceptada
Más respuestas (1)
Thorsten
el 17 de Nov. de 2014
theta = 0:360; l = 300:800;
[Theta, L] = meshgrid(theta, l);
Z = cos(Theta/180*pi)./L;
mesh(theta, l, Z)
Categorías
Más información sobre MATLAB 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!