Load logged data into memory


logs = loadIntoMemory(logs)



logs = loadIntoMemory(logs) loads the data in logs into memory. Data is logged to a repository and brought into memory on an as-needed basis. When you want to work with all elements of a large set of logged data, use loadIntoMemory to bring all of the elements into memory at once. Loading all the data at once, rather than element by element, is much faster.


collapse all

This example shows how to load a set of logged data into memory all at once, rather than element by element.

% Simulate model to generate logged data

The simulation logs all of the instrumented signals in the model to the Simulink.SimulationData.Dataset object sldemo_fuelsys_output. At the end of simulation, the signal data remains in the repository until used in the MATLAB workspace. When you work with small sets of data or only postprocess a subset, leaving signals in the repository improves performance. But when you have a large set of data and need to postprocess all of the signals, you should bring them all into memory at once.

% Load all logged signals into memory

All of the data in sldemo_fuelsys_output is now available for efficient postprocessing.

Input Arguments

collapse all

Data to load into memory. The loadIntoMemory function can load Simulink.SimulationData.Dataset and Simulink.SimulationOutput data.

Example: logsout

Output Arguments

collapse all

Data loaded into memory.

Introduced in R2017b

Was this topic helpful?