How do I include multiple functions in the MATLAB function block in Simulink?
15 次查看(过去 30 天)
显示 更早的评论
I am trying to implement a code in the matlab fuction block in simulink, but the matlab code has multiple functions within it which are called multiple times. Is there a way to keep the functions or should all the code be written in a single matlab file and then implemented in the matlab function block.
0 个评论
采纳的回答
Ashutosh Prasad
2018-9-14
You can have the functions saved as separate .m files in the same directory where your model is saved.
2 个评论
naveen kumar s
2022-3-7
you have told to save functions as seprate.m files (i have saved multiple functions as .m file). how these functions can be called to simulink model (A single MATLAB function block).
help is appreciated.
更多回答(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!