How to form this diagonal matrix?

1 Ansicht (letzte 30 Tage)
Janet
Janet am 23 Mär. 2012
E= diag [ 1 e^j*((2*pi)/M)........e^j*((2*pi)/M)*M-1 ]
where M=1024 and E= M x M diagonal matrix

Akzeptierte Antwort

Jarrod Rivituso
Jarrod Rivituso am 23 Mär. 2012
m = 4;
M = 1:m;
diagVals = exp(j*2*pi*(M-1./M))
E = diag(diagVals)
Is that right?
  3 Kommentare
Jarrod Rivituso
Jarrod Rivituso am 23 Mär. 2012
just because i didn't want a lot of output on my command window. you can easily change it to 1024 :)
Janet
Janet am 24 Mär. 2012
thank u :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Operating on Diagonal Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by