MATLAB Answers

Simulink use user-defined functions

4 views (last 30 days)
Vit Valek
Vit Valek on 14 Jun 2018
Answered: Gayatri Menon on 27 Jun 2018
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

  0 Comments

Sign in to comment.

Accepted Answer

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

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.