Borrar filtros
Borrar filtros

What is the matrix multiplication of these two vectors?

1 visualización (últimos 30 días)
Bella
Bella el 17 de Mayo de 2016
Comentada: Bella el 17 de Mayo de 2016
A=[ 1 1 1 4 5] and B=[1 2 3 4 5]

Respuesta aceptada

Todd Leonhardt
Todd Leonhardt el 17 de Mayo de 2016
Editada: Todd Leonhardt el 17 de Mayo de 2016
To do matrix multiplication the inner dimensions must agree. Both of your matrices are 1x5 vectors. You can do either of the following:
A' * B (results in a 5x5 matrix)
or
A * B' (results in a 1x1 scalar)

Más respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 17 de Mayo de 2016

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by