How can I find implement fzero in Simulink?
10 次查看(过去 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.
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 中查找有关 Configure and View Diagnostics 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!