I have written the following code to find the nth roots of a complex number-
z = input('Enter complex number ')
n = input('Enter degree of root ')
P = -1;P(n+1) = z;
r = roots(P)
Any ideas on how I can now use this code to produce a polarplot of the roots produced? Thanks

 Respuesta aceptada

Star Strider
Star Strider el 29 de Nov. de 2017

0 votos

Try this:
z = input('Enter complex number ')
n = input('Enter degree of root ')
P = -1;
P(n+1) = z;
r = roots(P)
mag = abs(r);
phs = angle(r);
figure(1)
polarplot(phs, mag, 'p')

Más respuestas (0)

Categorías

Más información sobre Data Type Identification en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 29 de Nov. de 2017

Editada:

el 29 de Nov. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by