Creating an Array in Simulink with Efficient Timing
9 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Configure and View Diagnostics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!