フィルターのクリア

Simulink syntax error for inverted pendulum model

1 回表示 (過去 30 日間)
Alex Chlabicz
Alex Chlabicz 2017 年 6 月 20 日
回答済み: Harish Saranathan 2017 年 7 月 28 日
Hello, I am modelling an inverted pendulum system in simulink. I am getting a syntax error in my "N" block in the "Inverted Pendulum" submodel in the simulink file attached. I have checked my equations and could not figure out what is wrong.
Any help would be appreciated. Thank you in advance.

回答 (1 件)

Harish Saranathan
Harish Saranathan 2017 年 7 月 28 日
Hello Alex,
The variables "l", "g" and "b" need to be defined in the workspace. Moreover, there was a syntax error (unbalanced brackets) in the function block "P". The line in it should read:
0.2*(l*(u(2))^2*cos(u(1))+l*u(3)*sin(u(1)))+g
Harish

製品

Community Treasure Hunt

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

Start Hunting!

Translated by