How to refresh the data in polar plot

3 visualizaciones (últimos 30 días)
Tharindu Weerakoon
Tharindu Weerakoon el 26 de Dic. de 2014
Comentada: Robert el 3 de Nov. de 2016
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

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 26 de Dic. de 2014
Editada: Azzi Abdelmalek el 26 de Dic. de 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 comentarios
Tharindu Weerakoon
Tharindu Weerakoon el 21 de En. de 2015
Thanks Azzi. Done it.
Robert
Robert el 3 de Nov. de 2016
really not a good way to do this but i have yet to find a better one

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Polar Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by