Is there a Matlab equivalent to Pythons’s cmath.rect(r, phi) that returns the complex number x with polar coordinates r and phi without resorting to
x = r * complex( cos(phi), sin(phi) );
?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think you are looking for
pol2cart. But the order of the arguments is different, that is,pol2cart(phi,r)as follows:If you need a complex output, you can do the following afterwards: