0

I am a newbie in MATLAB and I have to display values in polar plot. My values are like this

values1 = [1.424; 1.425; 1.411; 1.555; 1.023; 1.534]; % 100 values...
values2 = [120.323; 112.414; 114.412; 120.333; 120.665; 121.888]; % 100 values...

I figured out how to draw a plain circle but I don't know how to affect the line with those values (and draw the other one).

t = 0 : 2*pi/100 : 2*pi; 
r = (power(sin(t),2) + power(cos(t),2));
polar(t,r)

I am expecting something like this (just found image for illustration). How can I do it? Thank you. enter image description here

6
  • @excaza: I don't need to add text. I edited my post for better understanding. Commented Nov 17, 2015 at 12:50
  • I don't understand what you're asking. Do you just want to plot your data? Commented Nov 17, 2015 at 12:52
  • What is polar(t, r) with your actual data not doing that you're expecting? Commented Nov 17, 2015 at 12:56
  • Sorry, I am woring with MATLAB for the first time. My code draws only nice circle and I don't know how to insert the data (variables above) into the plot. Commented Nov 17, 2015 at 13:03
  • See: hold Commented Nov 17, 2015 at 13:05

1 Answer 1

2

Are you looking for something like this:

values1 = normrnd(100,10,1,101); % 101 values...
values2 = normrnd(100,10,1,101); % 101 values...
t = 0 : 2*pi/100 : 2*pi; 

figure,
polar(t,values1)
hold on
polar(t,values2)
hold off

For more information about the hold command check the Matlab help.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.