Error using * Inner matrix dimensions must agree.

2 Ansichten (letzte 30 Tage)
houssem alimi
houssem alimi am 17 Jan. 2019
Kommentiert: Walter Roberson am 18 Jan. 2019
error in matrix
  7 Kommentare
houssem alimi
houssem alimi am 18 Jan. 2019
how this code can be solved??
Walter Roberson
Walter Roberson am 18 Jan. 2019
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.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

madhan ravi
madhan ravi am 17 Jan. 2019
Bearbeitet: madhan ravi am 17 Jan. 2019
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 Kommentar
houssem alimi
houssem alimi am 17 Jan. 2019
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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Functions finden Sie in Help Center und File Exchange

Produkte


Version

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by