Integrate Simulink model simulation into matlab code
6 次查看(过去 30 天)
显示 更早的评论
Hey guys, how do I call a Simulink model in a matlab file so that I can evaluate the results of my simulation at specific points in time, and so that I can access and estimate the parameters of the simulink model. I tried a few commands but the model data needs to accessed like as if where from a separate Matlab function. Is there an approach to solve this problem?
0 个评论
回答(1 个)
Raghava S N
2024-10-28,5:16
Hi,
From my understanding, you want to integrate Simulink model simulations with MATLAB and want to access parameters and model data during the simulation.
To run simulations and access simulation data and parameters programmatically, based on the requirement, you can use the “sim” function or the “Simulation” object as described in this documentation link - https://www.mathworks.com/help/simulink/ug/using-the-sim-command.html.
Note that the “Simulation” object was introduced in the MATLAB R2024a release, and you will need to upgrade to MATLAB R2024a or a later release to use it as there is no workaround for the same..
Hope this helps!
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!