What kind of loop for this equation?
Show older comments
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?!
Accepted Answer
More Answers (1)
Thorsten
on 17 Nov 2014
theta = 0:360; l = 300:800;
[Theta, L] = meshgrid(theta, l);
Z = cos(Theta/180*pi)./L;
mesh(theta, l, Z)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!