logm and expm function
Ältere Kommentare anzeigen
Hi there,
%If we consider a diagnal matrix defined as:
delta=diag(exp(1i*2*pi*(0:10)/11));
%and we define another matrix C as:
C=diag(1i*2*pi*(0:10)/11);
%so, if we compute this:
D=logm(delta);
%D should be equal to C, right? but the result is not, part of elements in D is equal to C but not all of them. I can't fix this issue.
Many thanks to you!
Charlie
2 Kommentare
Dyuman Joshi
am 13 Sep. 2022
Bearbeitet: Dyuman Joshi
am 13 Sep. 2022
Edit - Check Walter Roberson's answer for more details on the question.
In your matrix delta, all terms except for the diagonal terms are 0. And thus using logm() would not be ideal.
delta=diag(exp(1i*2*pi*(0:10)))
Though you can use expm() on C and compare it with delta
C=diag(1i*2*pi*(0:10));
D=expm(C);
isequal(delta,D)
DDDD
am 13 Sep. 2022
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Mathematical Functions finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



