Create a polar surf plot with 3 measured data vectors
Mostrar comentarios más antiguos
I would like to create a polar plot with three measured data vectors: wind direction, wind speed and last the turbulence intensity. I would like to represent these three discrete data vectors in polar coordinate on a surface with an interpolation of the turbulence intensity values. Thank you very much.
Respuestas (1)
Samuel Vergara
el 30 de Jun. de 2016
It can be done. I don't know how you have your turbulency saved, so I will supose a turbulence function. Let's say that: x=wind direction y=wind speed z=turbulence(x,y)
X2=0:2*pi/n:2*pi; % direction in radians
Y2=0:(0.8/n):.8; % speed (radius)
[X,Y] = meshgrid(X2,Y2);
Z=ones(length(Y2),length(X2))
for i=1:length(X2),
for j=1:length(Y2)
Z(j,i)=turbulence(X2(i)*cos(Y2(j)), X2(i)*sin(Y2(j))]);
end
end
mesh(X.*cos(Y), X.*sin(Y), Z); % mesh or surf
I hope this helps you. Regards,
5 comentarios
tony74
el 30 de Jun. de 2016
Samuel Vergara
el 30 de Jun. de 2016
Editada: Samuel Vergara
el 30 de Jun. de 2016
Well, i think you don't need a mesh then. You need to plot a point for every coordinate given by X,Y,Z. See plot3 documentation. ->plot3(X,Y,Z).
I don't understand why you say polar. Are direction and speed angles? what are the dimensions of direction1, speed1 and intensity1 direction1, speed1 and intensity1 matrixs?
Regards.
tony74
el 1 de Jul. de 2016
Samuel Vergara
el 2 de Jul. de 2016
tony74
el 19 de Jul. de 2016
Categorías
Más información sobre Polar Plots 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!
