필터 지우기
필터 지우기

syntax error

조회 수: 21 (최근 30일)
Jason
Jason 2011년 4월 2일
답변: ningsih 2023년 2월 12일
I am trying to run a simulink block diagram simulation. I have the following function in a func block: (-1/(J/(X^2)+m))*(m*g*sin(u(3))-m*u(1)*(u(4))^2)
no matter what I do I continue to get a sytax error and I simply cannot see what the problem is. Can someone please take a look at this and tell me I am blind.

채택된 답변

Jarrod Rivituso
Jarrod Rivituso 2011년 4월 2일
There doesn't seem to be anything wrong just based on your syntax.
However, some things to think about...
  1. Are all the parameters defined in your workspace? It seems as though you've used an uppercase X and J, so be careful there.
  2. Is the input signal to the function block a vector with at least 4 elements? You can select Format -> Port/Signal Displays -> Signal Dimensions to see this.
Good luck.
  댓글 수: 1
Jason
Jason 2011년 4월 2일
Thanks Jarrod. The X was a entered as a lower case x in the command window. I figured it would be something simple.

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

추가 답변 (1개)

ningsih
ningsih 2023년 2월 12일
X = '('mon';'tues'; 'wed';'thurs';'fri';'sat';'sun')';

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by