Integrate Simulink model simulation into matlab code

조회 수: 1 (최근 30일)
Jon Petersen
Jon Petersen 2016년 9월 5일
답변: Raghava S N 2024년 10월 28일
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?

답변 (1개)

Raghava S N
Raghava S N 2024년 10월 28일
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!

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by