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';

回答 (1 件)

Rick Rosson
Rick Rosson 2016 年 3 月 23 日

0 投票

Try using * instead of .*

3 件のコメント

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

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

質問済み:

2016 年 3 月 23 日

コメント済み:

2016 年 3 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by