Help with matrix manpulation.
Show older comments
Hello!
I have a problem with matrix operation. I have a complex matrix M(n,m), I also have a matrix MM(n,m) with where each row have positions for each row where I want to keep the value for matrix M. Shown i this example
M=[1 2 3;3 2 1;2 3 1];
MM=[1 0 0;1 3 0;3 0 0];
What I want out of this is:
R=[1 0 0;3 0 1;0 0 1];
I have tried to solve this problem but obviously I am not skilled enough. Please help me.
Regards Björn
Accepted Answer
More Answers (0)
Categories
Find more on Random Number Generation 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!