can we interface simulink with matlab code?
显示 更早的评论
Is this possible to interface the simulink model output with matlab code?
回答(2 个)
Tamir Suliman
2018-2-26
编辑:Walter Roberson
2018-2-26
1 个投票
you can configure Model Callback Functions to call MATLAB code at specific times in the model lifetime. You can use PostLoadFcn to call something right after a model has been loaded, and InitFcn to call during model update, or right before simulation.
You can run MATLAB-file during simulation (as if it were one of the blocks) using the Interpreted MATLAB Function, but initial conditions are needed at the beginning of simulation, so using the InitFcn callback is a better place to do that.
ref
Walter Roberson
2018-2-26
0 个投票
See the To Workspace and To File blocks, and see the sim() command. It is also possible to invoke MATLAB graphics from inside Simulink.
1 个评论
DhanaLakshmiR
2018-3-2
编辑:DhanaLakshmiR
2018-3-2
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink Environment Customization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!