Log Big Data from Model
Open the example model sldemo_fuelsys.
open_system('sldemo_fuelsys')
Select Configuration Parameters > Data Import/Export > Log Dataset data to file.
set_param('sldemo_fuelsys','LoggingToFile','on')
Simulate the model.
sim('sldemo_fuelsys')
The MAT-file out.mat appears in your current folder. The file contains data for logged signals such as fuel (which is at the root level of the model).
At the command prompt, create a DatasetRef object that refers to the logging variable by name, sldemo_fuelsys_output.
DSRef = Simulink.SimulationData.DatasetRef('out.mat','sldemo_fuelsys_output');
Preview Big Data
Use curly br