Cannot allocate sufficient memory for log variable
16 views (last 30 days)
Show older comments
Hi, guys!
I'm running a pretty long simulation in Simulink and in the end of it I have to save some variables. I am using the block to workspace, but before get anything saved I have the following error:
Data logging exceeded available memory
Cannot allocate sufficient memory for log variable. Consider disabling logging or reducing the length of the simulation.
Does anyone know how to deal with it? Is there a way to divide the data into two different variables in Simulink to avoid this situation?
Thanks!
0 Comments
Answers (1)
Walter Roberson
on 18 May 2020
Moved: Sabin
on 5 Aug 2025
The problem is not with any one variable getting too large: the problem is with the total size getting too large. You are logging to memory, and running out of available memory between the total of everything that is getting logged.
You can be more selective about what you log. For example perhaps you could use a Rate Transition https://www.mathworks.com/help/simulink/slref/ratetransition.html to sample a signal.
0 Comments
See Also
Categories
Find more on Prepare Model Inputs and Outputs 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!