Parse error at u: usage might be invalid MATLAB syntax.

조회 수: 10 (최근 30일)
BO-HAO LIN
BO-HAO LIN 2021년 10월 25일
댓글: Dave B 2021년 10월 25일
I want to draw a curve of a cubic equation in SIMULINK, which shows a syntax error. I don’t know what the error is.

답변 (1개)

Dave B
Dave B 2021년 10월 25일
편집: Dave B 2021년 10월 25일
If you want to multiply you need a *
y=-0.0811*u^3...
Also consider if you want to raise a vector to the power of 3, you probably want .^
y=-0.0811*u.^3...
  댓글 수: 2
BO-HAO LIN
BO-HAO LIN 2021년 10월 25일
I made a stupid mistake, so do I have to modify it like this?
y=-0.0811*u.^3+13.573*u.^2-787.08*u+18366;
Dave B
Dave B 2021년 10월 25일
That looks good to me

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

카테고리

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

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by