|
"Rhys " <daviesjr3*NOspam*@cardiff.ac.uk> wrote in message <h3q649$s1c$1@fred.mathworks.com>...
> % This was my other option, made a post below, but this should have been included, % is this a way forward for me?
>
> % made up data
> x=[90, 180,330]; % <- note: row vec
> y=[-330 180 90]
>
> % the plot
> h=compass(x,y);
>
> %actual data I wish to plot
>
> % directions (degrees)
>
> directions = [ 148.7, -64.4, 93.1, -89.2, 125.9, -59.5]
>
> % and I would like to show a SE around the arrows...
>
> SE = [2.27, 2.63, 1.96, 1.86, 1.88, 8.60]
>
> % do I need to work out an X and Y for the directions and use the compass
> % plot? Is there a better way of doing this?
Hi Rhys,
This should solve your problem:
SE = [2.27, 2.63, 1.96, 1.86, 1.88, 8.60];
dir = [ 148.7, -64.4, 93.1, -89.2, 125.9, -59.5];
[x,y] = pol2cart(dir*pi/180,SE);
compass(x,y)
Sam
|