I have a phase angle at some amplitude, Please check the image i attached , why is it not getting plotted at particular Angle? I have pasted my code as well,,,anyone help
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
L K
am 18 Mär. 2017
Kommentiert: Image Analyst
am 18 Mär. 2017
phase = 26.52867848 amp = 0.463647609 theta_rad = phase ; polar(theta_rad, amp, 'r.');
Output is
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/161857/image.jpeg)
: See the red dot,, it should have got plotted at 26 Degree at that particular AMP(Radius)...What is the prob ?
0 Kommentare
Akzeptierte Antwort
Star Strider
am 18 Mär. 2017
It is plotting correctly (the red dot at about 80°) if ‘phase’ is actually in radians. If it’s in degrees and you want to convert it to radians, do the conversion first:
phase = 26.52867848;
amp = 0.463647609;
theta_rad = phase*pi/180; % Degrees-To-Radians
polar(theta_rad, amp, 'r.')
3 Kommentare
Star Strider
am 18 Mär. 2017
Because that’s the way MathWorks wrote the function!
(I have no better explanation!)
Image Analyst
am 18 Mär. 2017
By the way, polar() is deprecated. They recommend you start using polarplot() from now on, if you have R2016a or later.
You might also find deg2rad() or cart2pol() helpful.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Polar Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!