How do I display current speed and directional data with time on a feather plot?

Hi,
I am trying to use the feather plot function to display a set of data: speed (m/s), direction(degrees true), and time (yr:mm:dd:hh). Could someone please provide some insight...it would be greatly appreciated! I can't get the directional component to display correctly.

댓글 수: 2

Posting the relevant parts of your code (and if you’re plotting empirical data, at least a sample of the data, preferably as a .mat file) would help.
Avg speed Avg direction
0.042 232.1933333
0.016666667 236.7
0.071333333 229.4433333
0.039 261.07
0.030333333 290.1266667
0.043 349.7766667
0.024333333 47.37333333
0.073666667 285.9533333
0.027666667 133.7133333
0.036666667 265.3766667
0.017666667 54.52333333
0.055333333 127.0766667
0.051666667 315.3766667
0.041 351.36
0.011666667 187.91
0.050333333 122.06
I am trying to use the feather(u,v) function to show speed/direction as a function of time.

댓글을 달려면 로그인하십시오.

 채택된 답변

The problem is likely that you're viewing it with an unequal data aspect ratio... your speeds are so small compared to the unit spacing along the x axis that when stretched to fill the axis, all angles look vertical. I'd recommend scaling the data for display:
a = [...
0.042 232.1933333
0.016666667 236.7
0.071333333 229.4433333
0.039 261.07
0.030333333 290.1266667
0.043 349.7766667
0.024333333 47.37333333
0.073666667 285.9533333
0.027666667 133.7133333
0.036666667 265.3766667
0.017666667 54.52333333
0.055333333 127.0766667
0.051666667 315.3766667
0.041 351.36
0.011666667 187.91
0.050333333 122.06];
u = a(:,1)*50 .* cosd(270 - a(:,2));
v = a(:,1)*50 .* sind(270 - a(:,2));
feather(u,v)
axis equal

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Vector Fields에 대해 자세히 알아보기

질문:

2015년 9월 1일

답변:

2015년 9월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by