필터 지우기
필터 지우기

Unexpected MATLAB expression.

조회 수: 1 (최근 30일)
vaya putra
vaya putra 2018년 7월 4일
댓글: vaya putra 2018년 7월 4일
i try to make equation but when i run have problem Unexpected MATLAB expression.
a=(T) 247.8./((T-273)+68.12963))
anyone can help me

답변 (1개)

Stephen23
Stephen23 2018년 7월 4일
편집: Stephen23 2018년 7월 4일
MATLAB does not have implicit multiplication between adjacent values or variables. You need to write the multiplication explicitly:
a = T .* 247.8./((T-273)+68.12963)
^^ You need this!
I also fixed the unmatched parentheses.
  댓글 수: 4
Image Analyst
Image Analyst 2018년 7월 4일
If you just did
a=(T);
then that should work, but if you do
a=(T) 247.8./((T-273)+68.12963))
then there is no operator between the T) and the 247 and that causes a problem. Computer programming is not like writing or textbooks, where you can just leave out the multiplication symbol. If you want to multiply two things, like T and 2, or T and A, then you must put either a matrix multiplication operator, T*A, or an element-by-element operator T.*A.
vaya putra
vaya putra 2018년 7월 4일
done, thank you very much Walter

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Complex Logic에 대해 자세히 알아보기

태그

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by