MATLAB Answers

0

Syntax error in Simulink Fcn

Asked by Moritz Schmetzer on 5 Aug 2019
Latest activity Answered by Kaashyap Pappu on 8 Aug 2019
Hello all,
unfortunately I am getting a syntax error in Simulink in two Fcn blocks:
1) c1*(1-exp(-c2*u))-c3*u
2) cw*A*rho/2*u^2
I really can't find the problem in this so a little help is appreciated.
Many thanks in advace!

  1 Comment

Please show the complete error message.

Sign in to comment.

1 Answer

Answer by Kaashyap Pappu on 8 Aug 2019

Make sure the variables “c1”, “c2”, “u”, “c3”, “cw”, “A” and “rho” are defined in the MATLAB workspace or in one of the callbacks of the Simulink Model. The syntax for both equations is correct.
Furthermore, the denominator of equation 2 has a squaring operation, therefore care should be taken if “u” is a vector.

  0 Comments

Sign in to comment.