Euler's identity with angle in degrees
16 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ali Kiral
am 30 Jun. 2023
Kommentiert: Ali Kiral
am 30 Jun. 2023
How can I get MATLAB to accept a in degress in exp(aj) to return a complex number where j^2=-1? By default the software takes a in radians.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (2)
Joe Vinciguerra
am 30 Jun. 2023
Bearbeitet: Joe Vinciguerra
am 30 Jun. 2023
[EDIT: oops. converted in the wrong direction.]
deg2rad will convert degrees to radians (https://www.mathworks.com/help/matlab/ref/deg2rad.html).
So you'll do something like this:
j = sqrt(-1);
a = 180;
exp(deg2rad(a)*j)
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!