![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/173859/image.png)
How can I find implement fzero in Simulink?
22 ビュー (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
採用された回答
Orion
2016 年 3 月 29 日
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/173859/image.png)
1 件のコメント
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 件)
参考
カテゴリ
Help Center および File Exchange で Sources についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!