2
votes

How can you plot a straight line using polar() command in Matlab?

Example: (consider theta is in degrees)

rho1 = 50;         rho2 = 60;
theta1 = 45;       theta2 = 60;

syntax: polar(theta,rho);
1
Why not using regular plot for straight line? - Andrey Rubshtein
In which metric are you considering a line straight? ;) - Acorbe
@Acorbe the metric is the same (Euclidean) irrespective of whether the axes are Cartesian or polar. A straight line is a straight line whether seen overlayed with Cartesian or polar axes. - Abhranil Das

1 Answers

2
votes

Just like this:

  % Using your definitions:
rho=[rho1 rho2];
theta=[theta1 theta2];
polar(theta,rho);

enter image description here