Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.
이전 댓글 표시
Why does MatLab keep telling me this about my program? I need some help please.
Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To
construct matrices, use brackets instead of parentheses.

댓글 수: 2
Darrell
2023년 5월 14일
sol=inv'double'[A]*b
Walter Roberson
2023년 5월 14일
I do not recognize that programming language, but I am certain it is not MATLAB.
채택된 답변
추가 답변 (1개)
Walter Roberson
2020년 2월 28일
0 개 추천
MATLAB has absolutely no implicit multiplication. (A)B is never valid in MATLAB.
A(B) in MATLAB would always indicate either indexing or function call and never multiplication. Your m(L-xa) is either indexing m at location L-xa or else is calling function m. It does not mean to multiply m by L-xa
In every case in MATLAB if you want to multiply two values, you need to use the .* operator for element-by-element multiplication, or the * operator for algebraic matrix multiplication (inner product)
댓글 수: 5
Tyler
2020년 2월 28일
Walter Roberson
2020년 2월 29일
Find every place that you intend for there to be multiplication. If there is presently no operation at that point in the code, insert .* there. If there is * at that point in the code, change it to .*
For example (Tb-Tinf).*cosh
Tyler
2020년 2월 29일
Tyler
2020년 2월 29일
Walter Roberson
2020년 3월 1일
Ta = Tinf+ (Tb-Tinf)cosh(m(L-xa))/cosh(m*L); plot(xa,Ta,'ok','Linewidth',1)
As you would have followed my instructions to put .* everywhere that multiplication was intended, then we have ot ask what your intention is for the expression (Tb-Tinf)cosh(m(L-xa)) if it is not multiplication between (Tb-Tinf) and cosh(m(L-xa)) ? And what is your intention for the expression m(L-xa) if you did not intend multiplication between m and (L-xa) ?
카테고리
도움말 센터 및 File Exchange에서 Scripts에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
