How to refresh the data in polar plot

6 views (last 30 days)
I wanna refresh the data of polar plot with new data set.
How can I use set or refreshdata in the program?
I know how deal this with Cartesian plot, plot command.
for example:
x = linspace(0,8);
y = sin(x);
figure
h = plot(x,y);
h.XDataSource = 'x';
h.YDataSource = 'y';
y = sin(x.^3);
refreshdata

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 26 Dec 2014
Edited: Azzi Abdelmalek on 26 Dec 2014
x = linspace(0,8);
y = sin(x);
[theta,rho] = cart2pol(x,y)
h=polar(theta,rho,'--r')
h.YDataSource = 'y';
y = sin(x.^3);
refreshdata
  2 Comments
Robert
Robert on 3 Nov 2016
really not a good way to do this but i have yet to find a better one

Sign in to comment.

More Answers (0)

Categories

Find more on Polar Plots in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!