In Matlab I have a simple code where I use the fzero function to find a zero of a second order poly. Now I want to simulate this in Simulink, but I can't use the fzero function in Simulink (it doesn't let me assign a anonymous function in the function block).
Can someone tell me what the best wat is to use this functionality in Simulink?

 채택된 답변

Orion
Orion 2016년 3월 29일

0 개 추천

Hi,
You can use an Interpreted MATLAB Function block in your model.
Here, I'm solving sin(x) = 0 with an initial search value of 3.

댓글 수: 1

Jacopo Riccio
Jacopo Riccio 2020년 3월 30일
In case the "interpreted Matlab Fcn" block has to go insight a mask, the simulink diagnostic viewer reports an error of an undefiened function, while the same error does not show up if the block is used in a nested mask. Do you please have a solution to this issue?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Verification, Validation, and Test에 대해 자세히 알아보기

제품

질문:

2016년 3월 29일

댓글:

2020년 3월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by