How to Compute Cartesian to Polar If the ThetaZeroLocation on Top ?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Zaidan Adenin Said
le 7 Mai 2021
Commenté : Zaidan Adenin Said
le 9 Mai 2021
Hello, like the title of this question, i need to compute a Cartesian Points to Polar Point if the ThetaZeroLocation is on top.
Im using the code :
r = sqrt(x^2+y^2) %for rho
t = atan(y/x) %for theta
even im using this code :
t = atan2(y/x)
and
[theta,rho] = cart2pol(x,y)
the answer is still wrong. The value on rho or r is right ( but its has little different ) but the value on t or theta is wrong.
for example the data is
x = -0.00781250;
y = -9.593750000000000
so the real answer is
r = 9.605468750000000
t = 1.801263427734375e+02 % == 180.126
but i get this if im using the first code
r = 9.5938
t = 1.5700
and with the cart2pol
rho = 9.5938
theta = -1.5716
i get this data pair each other so i know the real value.
The polar graphic that i use is like this :
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/610385/image.jpeg)
as you can see the zero theta location is on top and its clockwise. so how do i can compute it ?
NB : im sorry if my english is bad
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Polar Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!