How to form this diagonal matrix?
3 次查看(过去 30 天)
显示 更早的评论
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
2012-3-23
m = 4;
M = 1:m;
diagVals = exp(j*2*pi*(M-1./M))
E = diag(diagVals)
Is that right?
3 个评论
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 :)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 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!