Inner matrix dimensions must agree
이전 댓글 표시
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
답변 (2개)
Jan
2016년 11월 14일
0 개 추천
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
2016년 11월 14일
4*(0.985)*(5.67*10.^-8)*(TS).^3*(TT)
(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.
댓글 수: 6
b.m.n n
2016년 11월 15일
Alexandra Harkai
2016년 11월 15일
What are the current sizes?
b.m.n n
2016년 11월 15일
Alexandra Harkai
2016년 11월 15일
In this case,
TA-TS
would not even work because TA and TS have different sizes and none of them is a scalar.
What is the computation you want to implement there?
b.m.n n
2016년 11월 16일
Alexandra Harkai
2016년 11월 16일
It is not exactly clear what you are tying to achieve. Depending on what the vectors represent, the operation may not even make sense. Are you sure this is the computation you need?
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!