I have a syntax error with Fcn
조회 수: 3 (최근 30일)
이전 댓글 표시
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
채택된 답변
Ameer Hamza
2020년 9월 28일
편집: Ameer Hamza
2020년 9월 28일
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
추가 답변 (1개)
Fangjun Jiang
2020년 9월 28일
Use "sgn" instead of "sign". It is in the document. Click "Help" after double click the block.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!