フィルターのクリア

polar-style direction plot

2 ビュー (過去 30 日間)
Jakob Sievers
Jakob Sievers 2011 年 9 月 5 日
Hi guys
I have a wind-detector set up to monitor wind directions [angle=0-360 degrees] for a period of time, T. In order to visualize the wind direction over time I was considering making a polar-style plot in which the distance between the center and the circumference represents the time T and the wind-direction would be represented by a line navigating within the circle depending on time and angle.
How can I do this in matlab?
Thanks in advance!

採用された回答

Paulo Silva
Paulo Silva 2011 年 9 月 5 日
doc quiver
example
%create fake data to plot with quiver
a=360*rand(1,10); %create 10 angle values of the wind angle
s=10*rand(1,10); %create 10 strength values of the wind
u=s.*cosd(a); %convert the angle to length of the arrow (x value)
v=s.*sind(a); %convert the angle to length of the arrow (y value)
quiver(1:10,zeros(1,10),u,v) %do the quiver
axis([-1 12 -5 5]) %select the axes range so you can see it all
  2 件のコメント
Jakob Sievers
Jakob Sievers 2011 年 9 月 5 日
Hi again. This is not exactly what I had in mind. I messed around a bit with polar-plots and figured it out after a while. Here's a simple example, where yy is a set of fake wind-direction data with noise:
T=1:2000;
y=.2*sin(.003*T)+.4+(randn(1,length(T))./50);
yy=y.*360;
polar(yy*(pi/180),T,'-r')
Thanks for the help though!
Paulo Silva
Paulo Silva 2011 年 9 月 5 日
nice one, much better than my code :) but it doesn't account for wind strength, ok your data doesn't have that info :) good work

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAxes Transformations についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by