How to form this diagonal matrix?

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

 채택된 답변

Jarrod Rivituso
Jarrod Rivituso 2012년 3월 23일

0 개 추천

m = 4;
M = 1:m;
diagVals = exp(j*2*pi*(M-1./M))
E = diag(diagVals)
Is that right?

댓글 수: 3

Janet
Janet 2012년 3월 23일
why is m=4?
Jarrod Rivituso
Jarrod Rivituso 2012년 3월 23일
just because i didn't want a lot of output on my command window. you can easily change it to 1024 :)
Janet
Janet 2012년 3월 24일
thank u :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by