How to set the diagonal of a cell array of matrices?
Show older comments
Hi,
I'm looking to set the diagonal of my cell array to identity, specifically eye(3,3). I know a simple for loop solution exists, but if there's something more elegant please let me know.
Thank you.
Accepted Answer
More Answers (1)
Mohammed Kagalwala
on 29 Oct 2019
1 vote
Categories
Find more on Operating on Diagonal Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!