Matrix dimensions must agree.

I am trying to multiply the same matrix by the transpose of itself and it is giving me the error of matrix dimensions must agree. Code: XX=X.*X';

Respuestas (1)

Rick Rosson
Rick Rosson el 23 de Mzo. de 2016

0 votos

Try using * instead of .*

3 comentarios

mike moran
mike moran el 23 de Mzo. de 2016
that will not work because X is a matrix of 135x100, therefore would need to use element by element multiplication.
Rick Rosson
Rick Rosson el 23 de Mzo. de 2016
Have you tried it?
mike moran
mike moran el 23 de Mzo. de 2016
I figured it out. My matrix was in uint8 and it needed to be in double.

Iniciar sesión para comentar.

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Preguntada:

el 23 de Mzo. de 2016

Comentada:

el 23 de Mzo. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by