Error using * Inner matrix dimensions must agree.

4 ビュー (過去 30 日間)
houssem alimi
houssem alimi 2019 年 1 月 17 日
コメント済み: Walter Roberson 2019 年 1 月 18 日
error in matrix
  7 件のコメント
houssem alimi
houssem alimi 2019 年 1 月 18 日
how this code can be solved??
Walter Roberson
Walter Roberson 2019 年 1 月 18 日
dbstop if error
run the code. when it stops look at the sizes of all of the variables involved and extract portions of the expression until you figure out which multiplication is triggering the error and what the sizes are of the left and right. Then you trace backwards in the code to figure out why they got to be that size.

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

採用された回答

madhan ravi
madhan ravi 2019 年 1 月 17 日
編集済み: madhan ravi 2019 年 1 月 17 日
Use size() to check the sizes of the variables if they have compatible sizes ( https://www.mathworks.com/help/matlab/matlab_prog/compatible-array-sizes-for-basic-operations.html#responsive_offcanvas ) .
  1 件のコメント
houssem alimi
houssem alimi 2019 年 1 月 17 日
size(chi_m(1,i))
ans =
1 1
size(x_m)
ans =
4 9
size(y_m)
ans =
2 4
size(yt)
ans =
2 4

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFunctions についてさらに検索

製品


リリース

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by