Ask an expert. Trust the answer.

Your academic and career questions answered by verified experts

how to make a polar plot line continuous between end and beginning

Date: 2023-08-11 13:42:29

I am plotting polar plots and i would like to have the line linked between the last and first point of the plot.
 
I tried to find out if there was a way to achieve that, but was not able, is there any way?

Answer:

Try this:

 

hold on
t = 0:.01:pi;
h1=polar(t,2*t,'--r')
t1=t(1);
[THETA,RHO] = pol2cart(t1,2*t1) %last
t2=t(end);
[THETA1,RHO1] = pol2cart(t2,2*t2) %first
h2=plot(THETA,RHO,'*')
h3=plot(THETA1,RHO1,'r*')
h4=line([THETA THETA1],[RHO RHO1])
legend([h1 h2 h3 h4],'polar line','first value','last value','line from first value to last value')

 


Why Matlabhelpers ?

Our Matlab assignment helpers for online MATLAB assignment help service take utmost care of your assignments by keeping the codes simple yet of high-quality. We offer the most reliable MATLAB solutions to students pursuing their Computer Science course from the Monash University, the University of Sydney, the University of New South Wales, the University of Melbourne; to name a few. Approach us today for best Matlab solutions online!

whatsApp order on matlabhelpers.com

telegram order on matlabsolutions.com