I want to divide each row of a matrix with corresponding element in another matrix .Please help.
75 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
For eg: I have a matrix
A=[9 6 3;
4 2 8;
1 0 0;]
divide A by B=[3 2 1] to get the result
C=[3 2 1;
2 1 4;
1 0 0;]
0 commentaires
Réponse acceptée
Plus de réponses (2)
First Last
le 28 Mar 2018
Modifié(e) : First Last
le 28 Mar 2018
Make sure B is transposed to a column vector, i.e.,
C=A./B';
0 commentaires
Voir également
Catégories
En savoir plus sur Matrix Indexing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!