Feather and quiver not displaying data properly.
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I have been having trouble using feather (and quiver) plots to display wind direction.
Basically I have hourly summaries of wind direction (0-360) and I am plotting them for each hour. I have them plotted but the arrows are not-corresponding to the proper position. i.e. an arrow pointing to north (0) is not pointing completely vertical as it should, and all angles appear to be off. I've tried many ways of manipulating to solve this issue but nothing has worked. I noticed compass plots have 0 along the x axis which might be related. But with compass you are able to use 'view' to change orientation...that does not appear to work for feather plots.
Here is my code at the moment:
winddirvector=numericvalues(:,7);
ffeather=figure;
p1=subplot(2,1,1);
theta=winddirvector*pi/180;
r=2*ones(size(winddirvector));
[u,v]=pol2cart(theta,r);
wdvp=feather(u,v);
I've tried changing wdvp to feather(sin(u), cos(u)) and it made the arrows point closer but still not accurate direction. I feel there are some math/geometry issues I am missing.
Any help is appreciated as a new MATLAB user.
5 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Polar Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!