How can I find implement fzero in Simulink?

10 visualizaciones (últimos 30 días)
Igor Batoukhtine
Igor Batoukhtine el 29 de Mzo. de 2016
Comentada: Jacopo Riccio el 30 de Mzo. de 2020
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?

Respuesta aceptada

Orion
Orion el 29 de Mzo. de 2016
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 comentario
Jacopo Riccio
Jacopo Riccio el 30 de Mzo. de 2020
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?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Configure and View Diagnostics en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by