Help with matrix manpulation.
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Random Number Generation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!