MATLAB Answers

Matrix dimensions must agree.

조회 수: 5(최근 30일)
mike moran
mike moran 23 Mar 2016
댓글: mike moran 23 Mar 2016
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';

  댓글 수: 0

댓글을 달려면 로그인하십시오.

답변(1개)

Rick Rosson
Rick Rosson 23 Mar 2016
Try using * instead of .*

  댓글 수: 3

mike moran
mike moran 23 Mar 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 23 Mar 2016
Have you tried it?
mike moran
mike moran 23 Mar 2016
I figured it out. My matrix was in uint8 and it needed to be in double.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by