how to set anti diagonal part of matrix with zero value elements ?
4 次查看(过去 30 天)
显示 更早的评论
i know that how to set diagonal part of matrix to zero, for that we have a code m=256; n=256; a=ones(m,n); u=triu(a); imshow(u);
but in case of anti diagonal what will be code?
0 个评论
采纳的回答
Nicolai Sanders
2017-3-8
I think this might do what you need.
m=256; n=256; a=ones(m,n); u=flip(triu(a)); imshow(u);
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!