Borrar filtros
Borrar filtros

how to multiply matrix vectors with one column?

2 visualizaciones (últimos 30 días)
sara
sara el 9 de Nov. de 2014
Editada: sara el 9 de Nov. de 2014
if i have matrix M = [1 0 1 0; 1 0 0 1;1 1 1 0;1 1 1 1; ...] and i want to multiply each row with one cloumn B=[1 0 0 1] how to do this?

Respuesta aceptada

Mohammad Abouali
Mohammad Abouali el 9 de Nov. de 2014
M*B'
  3 comentarios
Mohammad Abouali
Mohammad Abouali el 9 de Nov. de 2014
Editada: Mohammad Abouali el 9 de Nov. de 2014
B' is 4x1 M is 4x4 then C=M*B' would be also 4x1. then you can not compute C*M since C is 4x1 and M is 4x4.
But you can compute C1=M*C and then C2=M*C1. Exactly as we are writing this.
sara
sara el 9 de Nov. de 2014
Editada: sara el 9 de Nov. de 2014
that what i meant....C1=M*C and then C2=M*C1. and so on until one answer is repeated. i try to use for loop but it didn't work

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by