What kind of loop for this equation?
Afficher commentaires plus anciens
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?!
Réponse acceptée
Plus de réponses (1)
Thorsten
le 17 Nov 2014
theta = 0:360; l = 300:800;
[Theta, L] = meshgrid(theta, l);
Z = cos(Theta/180*pi)./L;
mesh(theta, l, Z)
Catégories
En savoir plus sur MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!