How to create a polar plot?

조회 수: 25 (최근 30일)
Susan
Susan 2022년 11월 7일
댓글: Susan 2022년 11월 7일
Hi All,
I have a signal (a complex tall vector) and I'd like to creat polar plots of it with a line connecting points that are adjacent in time.
the signal is attached and any thoughts on that would be greatly appreciated.
This is what I did so far, but seems something is wrong
x = real(S);
y = imag(S);
rho = sqrt(x.^2+y.^2)
theta = atan(y./x)
polarplot(theta, rho)
and I got this
I don't underestand why is everything in the right half plane.

채택된 답변

David Hill
David Hill 2022년 11월 7일
load S
x = real(S);
y = imag(S);
rho = sqrt(x.^2+y.^2);
theta = atan2(y,x);%use atan2 (4 quadrant)
polarscatter(theta, rho,'filled','SizeData',10);%I assume you want a scatter plot
  댓글 수: 1
Susan
Susan 2022년 11월 7일
Cool! thank you so much for your help!

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by