Error using * Inner matrix dimensions must agree.

조회 수: 3 (최근 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 CenterFile Exchange에서 Functions에 대해 자세히 알아보기

제품


릴리스

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by