How can I store data from my simulink model in and and use it during runtime.
Show older comments
How can I store data from my simulink model in and and use it during runtime. I used the data store blocks and trigger subsystem to enable data store only during specific events. But at a sample time of 1e-4 sec there's a lot of data. I want to only buffer 50 points.
2 Comments
Walter Roberson
on 1 Mar 2026
Depending on what you need to do with the stored signals, one possibility is the Propagation Delay block; https://www.mathworks.com/help/simulink/slref/propagationdelay.html
Answers (1)
Does the trigger event enable the execution of an enbabled subsystem? Is the data to be captured from a signal inside that enabled subsystem? Do you only need the 100-element array once? Or do you need a sequence of 100-element arrays, i.e., in this example process a new 100-element array every 1e-2 sec?
In base Matlab the Tapped Delay - Delay scalar signal multiple sample periods and output all delayed versions - Simulink block might be of use. Also, the DSP System Toolbox may be of be of interest with blocks like Buffer - Buffer input sequence to smaller or larger frame size - Simulink.
A bit more detail on the model strucuture would be helpful to be more helpful.
Categories
Find more on Buffers, Switches, and Counters in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!