필터 지우기
필터 지우기

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 (최근 30일)
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
L K
L K 2016년 11월 19일
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.

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2016년 11월 19일
You need
hold on
Inside the loop
  댓글 수: 5
Walter Roberson
Walter Roberson 2016년 11월 21일
load data
theta = data(:,1);
radius = data(:,2);
rho = radius %just for display, not needed for computing
polar(theta, radius, '*')

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Polar Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by