MATLAB: 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

plot

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

Best Answer

You need
hold on
Inside the loop