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

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 日

0 投票

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

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

製品

リリース

R2021b

タグ

質問済み:

2021 年 10 月 25 日

コメント済み:

2021 年 10 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by