Complex Numbers in Matlab
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Arun998
am 29 Nov. 2017
Bearbeitet: Arun998
am 29 Nov. 2017
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
0 Kommentare
Akzeptierte Antwort
Star Strider
am 29 Nov. 2017
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')
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Type Identification finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!