Pol2cart function giving wrong cartesian values, why?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Using the code pol2cart and cart2pol, trying to prove that the rho and theta input can be retrieved back but its not giving the same values. HELP!
prompt1 = 'what is I1?';
prompt2 = 'what is I1 angle?';
RHO = input(prompt1);
THETA = input(prompt2);
[X,Y] = pol2cart(RHO,THETA)
[THETA1,RHO1] = cart2pol(X,Y)
0 comentarios
Respuestas (1)
Geoff Hayes
el 5 de En. de 2015
Akintomide - you may need to provide an example of the code not working. Remember, according to pol2cart, the theta must be in radians AND the input to plo2cart is THETA first and then RHO. For example,
RHO = 42.3;
THETA = pi/4;
[X,Y] = pol2cart(THETA,RHO)
[THETA1,RHO1] = cart2pol(X,Y)
produces the expected/desired result.
0 comentarios
Ver también
Categorías
Más información sobre Audio Processing Algorithm Design en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!