matrix vector substraction
Mostrar comentarios más antiguos
z=[1,2,3,4,5,6,7,8;4,5,6,7,8,9,0,1;1,2,3,4,5,6,7,8;10,11,12,13,0,0,0,0];
y=[1,2,3,4];
how can i find z-y without loops thanks.
Respuesta aceptada
Más respuestas (2)
Amey
el 11 de Oct. de 2011
0 votos
To do matrix subtraction, dimensions of both the matrices should be same. Here its not the case. Matrix z is 4*8 while matrix y is 1*4
osman
el 11 de Oct. de 2011
0 votos
1 comentario
Sean de Wolski
el 11 de Oct. de 2011
each column of y as it is, i.e. each row of y-transpose? See my answer.
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!