I have a syntax error with Fcn
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Quy Long Vu
il 28 Set 2020
Commentato: Ameer Hamza
il 28 Set 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
0 Commenti
Risposta accettata
Ameer Hamza
il 28 Set 2020
Modificato: Ameer Hamza
il 28 Set 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 Commenti
Più risposte (1)
Fangjun Jiang
il 28 Set 2020
Use "sgn" instead of "sign". It is in the document. Click "Help" after double click the block.
0 Commenti
Vedere anche
Categorie
Scopri di più su Structures in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!