Creating an Array in Simulink with Efficient Timing
9 views (last 30 days)
Show older comments
Hello,
I am building a model in Simulink. In this model, I need to create an array and save this array for analysis when the simulation is done. I don't want to use an interpreter because it slows down the simulation time and I am already suffering in terms of time.
In Simulink, in order to preserve the value of an output, it must be loopbacked to input with unit delay. At least it is one of the methods I saw. So, for now, I built a loopback of array and it worked. However, it really slows down the simulation. You can see the structure in the figure below: 

departureArray and arrivedArray are 3x1000 arrays.
If I don't provide a loopback, I lost the previous values as I iterate over the array. To workspace function keeps only the last value so I receive every member of the array when the simulation is ended. Is there an efficient solution to preserve the values of an array in Simulink?
Thanks in advance.
0 Comments
Answers (0)
See Also
Categories
Find more on Configure and View Diagnostics 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!