How to Multiply a number to a row of matrix
Afficher commentaires plus anciens
For example i have matrix
A = [ 1 2 3 ; 3 4 5]
I want to multiply 2 to the 2nd row of the matrix so i got
A = [ 1 2 3 ; 6 8 10]
Réponse acceptée
Plus de réponses (1)
David Wilson
le 26 Déc 2017
1 vote
or if you have a recent version of Matlab, then one can avoid the cryptic bxfun with
>> A.*[1;2]
Catégories
En savoir plus sur Creating and Concatenating Matrices 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!