I have two sets of data that are being plotted using matlab's polar function.
They are:
theta1= rho1=
10 1
20 2
30 3
40 4
and
theta2= rho2=
50 5
60 6
70 7
80 8
I have tried a few others but this code seems the most logical:
polar(theta1, rho1, 'k');
polar(theta2, rho2, [0 1 0]);
This is supposed to display all of the data in my arrays on one polar plot with part of the line being black and part of it being green. However, I keep getting an error with this.
Can anyone point me in the right direction?
Thanks in advance,
Arnold Brownschwagger
|
|
0
|
|
|
|
Reply
|
fudgethebucket554 (2)
|
6/29/2010 9:17:32 AM |
|
Try this.... the axis don't resize, but you can maybe change that with set.
theta1=[10 20 30 40];
theta1rad=theta1*pi/180;
rho1=[1 2 3 4];
theta2=[theta1(end) 50 60 70 80];
theta2rad=theta2*pi/180;
rho2=[rho1(end) 5 6 7 8];
polar(theta1rad, rho1, 'k');
hold on
polar(theta2rad, rho2, 'r');
Fred
|
|
0
|
|
|
|
Reply
|
Frédéric
|
6/29/2010 2:50:07 PM
|
|