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 Comments

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.

Sign in to comment.

 Accepted Answer

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

More Answers (0)

Categories

Community Treasure Hunt

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

Start Hunting!