Run Simulink Model as a Function
显示 更早的评论
Greetings,
I'm inheriting a complicated simulink model. My goal is to encapsulate said simulink model for use by my matlab functions.
To illustrate my problem, below is a simple simo.slx with input at Port 1 and output at Port 2. Is there a way to encapsulate this such that I could do the following in Matlab Command line?

%% Desired Function created from simulink slx model
output = simo(3); % returns output = 6
With the capability above, my plan is to do use the function generated by Simulink inside a ODE45 function. Unfortunately sim function does not achieve what I need as it runs the entire standalone simulink model.
Thank you in advance.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 General Applications 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
