Simulink use user-defined functions

Hi,
is possible to call functions (user-defined functions) from Simulink blocks? For example
function y = myadd(u,v) %#codegen
y = sqrt(u+v);
end
I do not wanna rewrite functions to S-function or use some MATLAB functions. I want to take function and call them from Simulink block.
Thanks!
Vit

 Respuesta aceptada

Gayatri Menon
Gayatri Menon el 27 de Jun. de 2018

0 votos

Hi,
Could you check out MATLAB Function block? Please refer the below documentation for more details:
Hope this helps.
Thanks
Gayatri

Más respuestas (0)

Categorías

Más información sobre Simulink Coder en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 14 de Jun. de 2018

Respondida:

el 27 de Jun. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by