Borrar filtros
Borrar filtros

Can anyone help me in this code? Only the first radius value is being taken everytime, its not getting incremented..... what change i have to do?

1 visualización (últimos 30 días)
load data
theta=data(:,1);
radius=data(:,2);
t=length(radius);
for i=1:1:t;
%rho = radius(i)*ones(size(theta)) ;
rho(i)=radius(i);
%theta=theta(i);
end
for i=1:1:t;
rho = rho(i)*ones(size(theta)) ;
polar(theta,rho,'*')
end
  2 comentarios
L K
L K el 19 de Nov. de 2016
in the first loop am just saving the radius values in variable , to see if the are getting incremented.
second loop i used to plot them.
i have attached the figure, all the points are getting plotted with radius 5 only,
i want every angle to be plotted to its corresponding value in the sheet.

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 19 de Nov. de 2016
You need
hold on
Inside the loop
  5 comentarios
Walter Roberson
Walter Roberson el 21 de Nov. de 2016
load data
theta = data(:,1);
radius = data(:,2);
rho = radius %just for display, not needed for computing
polar(theta, radius, '*')

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