Inner matrix dimensions must agree
1 view (last 30 days)
Dear All Can anyone help me about this equation Qb=Qba*(1-(0.3251).^2)+4*(0.985)*(5.67*10.^-8)*(TS).^3*(TT); When i run it , I get this error Error using * Inner matrix dimensions must agree. where Qba [37*37 double] TS[37*1 double] TT [37*31 double] Thank All
Jan on 14 Nov 2016
As you see, you want to multiply a [71x1] vector with a [37x31] matrix. This is mathematically not defined. What do you expect as output?
Alexandra Harkai on 14 Nov 2016
Here according to the operator precedence this happens:
(some_constant * (TS.^3)) * TT
which would require a matrix of 37x1 to be multiplied by a matrix of size 37x31, which is giving you the error.
It is possible the calculation is not formulated correctly in the first place.