How to plot in cylindrical coordinates from a matrix.
2 views (last 30 days)
Show older comments
I have code that produces relative velocities at points on an helicopter aerofoil as it rotates. I have the relative velocities in a matrix with the radius changing with columns and the azimouth angle changing in the rows. I would like a coloured graph showing the velocity at every point. Below is the code that finds the matrix:
function [Vmat, amat] = relativecalcs (beta, U, w_g)
j = 1;
for (az = 0:(pi/16):2*pi)
i = 1;
for (r = rmin:0.05:rmax)
Vaz(i) = w_g*r + U*cos(az)*cos(beta);
Vh(i) = U*cos(az)*sin(beta);
V(i) = sqrt(Vaz(i)^2 + Vh(i)^2);
if Vaz(i)<0
V(i) = -1 * V(i);
end
alpha(i) = tan(Vh(i)/Vaz(i));
Vmat(j,i) = V(i);
amat(j,i) = alpha(i);
i = i + 1;
end
j = j + 1;
end
0 Comments
Answers (0)
See Also
Categories
Find more on Assembly 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!