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

10 visualizaciones (últimos 30 días)
BO-HAO LIN
BO-HAO LIN el 25 de Oct. de 2021
Comentada: Dave B el 25 de Oct. de 2021
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.

Respuestas (1)

Dave B
Dave B el 25 de Oct. de 2021
Editada: Dave B el 25 de Oct. de 2021
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 comentarios
BO-HAO LIN
BO-HAO LIN el 25 de Oct. de 2021
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 el 25 de Oct. de 2021
That looks good to me

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by