MATLAB: I have a syntax error with Fcn

syntaxsyntax error

I want to give a formula is sign(u(2)-u(3)) into Fcn, but I got a message is
The expression: sign(u(2)-u(3))
in 'hebonnuoc/He bon nuoc /h1dot'
has a syntax error

Best Answer

The documentation page shows that you should use sgn instead of sign: https://www.mathworks.com/help/simulink/ref_obsolete_blocks/fcn.html
sgn(u(2)-u(3))
Also, this block is obsolete; consider using a better alternative: https://www.mathworks.com/help/simulink/slref/matlabfunction.html