Store data logged by Scope signal viewer
For new models, use the
Simulink software creates instances of this class to log
data displayed on Scope viewers (see Visualize Results).
In particular, if you have enabled data logging for a model, Simulink software
creates an instance of this class for each scope viewer enabled for
logging in the model and assigns it to a property of the model's
Simulink.ModelDataLogs object. The
instance created for each viewer has a Name property whose value is
the name specified on the History pane of the viewer's parameter dialog
box (see Scope for more information).
The instance also has an axes property for each of the scope's axes
Axes2, etc. The
value of each axes property is itself a
one for each signal displayed on the axes. The time series objects
contain the signal data displayed on the axes.
This model displays signals
a Scope viewer that has only one axis.
The model enables data logging as a whole under the default
To log signals attached the Scope viewer, right click a signal, select Properties, and then select the Log signal data check box.
After simulation of the model, the MATLAB® workspace contains
Simulink.ModelDataLogs object named
Simulink.ScopeDataLogs object that in turn contains
Simulink.ScopeDataLogs object that contains
that contain the times series data for signals
You can use Simulink data object dot notation to access the data, e.g.,
>> logsout logsout = Simulink.ModelDataLogs (scopedatalogs_ex): Name Elements Simulink Class SL_G11 1 Timeseries SL_G21 1 Timeseries