I have a syntax error with Fcn

3 visualizaciones (últimos 30 días)
Quy Long Vu
Quy Long Vu el 28 de Sept. de 2020
Comentada: Ameer Hamza el 28 de Sept. de 2020
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

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 28 de Sept. de 2020
Editada: Ameer Hamza el 28 de Sept. de 2020
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
  2 comentarios
Quy Long Vu
Quy Long Vu el 28 de Sept. de 2020
Thank you so much. I got it
Ameer Hamza
Ameer Hamza el 28 de Sept. de 2020
I am glad to be of help!!!

Iniciar sesión para comentar.

Más respuestas (1)

Fangjun Jiang
Fangjun Jiang el 28 de Sept. de 2020
Use "sgn" instead of "sign". It is in the document. Click "Help" after double click the block.

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by