Evaluate Simulink model at a given time vector
조회 수: 11(최근 30일)
표시 이전 댓글
Daniele Venanzetti 2021년 12월 21일
댓글: Daniele Venanzetti 2022년 1월 5일
I have a Simulink model that I run from Matlab and I also use the block "from workspace" to load some data. As you know, I also have to load the time stamp alongside the data I want to use.
Now, I need to enforce Simulink to evaluate the model at the times stated in the block "from workspace". Ideally, this wouldn't require any interpolation in the block "from workspace".
I load this dummy DATA in my model
DATA = [0, 0;...
where [0, 1, 1.3, 2.1] is the time stamp and [0, 10, 18, 21] is the vector I need. I want Simulink to evaluate the model exactly at times [0, 1, 1.3, 2.1]. It's like a very special variable time step that I would like to enforce.
I hope I have explained clearly what I need.
Thank you everyone in advance!
댓글 수: 0
Salman Ahmed 2021년 12월 31일
Assuming you wish to produce the simulation outputs at specified times, navigate to the model configuration settings under Data Import/Export option, find "Output Options" in Additional Parameters. Set this parameter to "Produce specified output only". Then you can specify the "Output Times" array for which you want to produce the output.
댓글 수: 1
Find more on Sources in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!