I have a 1 x 360 array of a function I have computed in one degree
increments from a model in the lab. I want to use matlab to display
this in a circular plot to show varying intensity with angular
displacement, however I cannot seem to get my function to work
properly with the polar plot function; I should have one full circle
of values with one every one degree, however polar plot does not seem
to do this at all. I suspect my argument should be in radians instead
of degrees but surely there is a way to get it to display my data in a
circular diagram ? The data has a max of 60.5 and a min of 8.1..
Thanks in advance..
Yes, you need to provide radians instead of degrees for the angles for polar
plots. You can use
degreestoradians = linspace(0,2*pi,361);
then provide the polar() function with either degreestoradians(1:end-1) or
degreestoradians(2:end) depending on whether you want your first point to be
at angle 0 degrees (ending at 359) or if you want your first point to be at
angle 1 degree (ending at 360).
DRG <grim...@gmail.com> wrote in message <13e90a7d-268f-4ace...@m37g2000yqf.googlegroups.com>...
You could get that effect if any of the values to be plotted are
negative or complex, or if you reversed the order of the parameters.
Beyond that... a bit later I'll do a small experiment to verify that my
logic was correct (I'm not by my matlab machine at the moment.)
Logic checked... linspace(0,2*pi,361) as the angle works fine for 0 to 360
degrees (inclusive) in 1 degree steps.
For example,
d = linspace(0,2*pi,361);
polar(d,abs(sin(d)));
should give you two circles.