how i subtract a vector( 1*n-dim ) from columns of a matrix (n*n-dim) without uses for , end and orders likes these?
Afficher commentaires plus anciens
i wish subtract a vector from columns of a matrix while my code is not great. example: a =
1 3
4 2
>> a-[1 2]= 0 1 3 0
Réponse acceptée
Plus de réponses (1)
Joseph Cheng
le 24 Avr 2015
0 votes
Look at the function repmat() to tile the vector to perform the matrix subtraction.
1 commentaire
xosro
le 24 Avr 2015
Catégories
En savoir plus sur Logical 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!