Simulink.ScopeDataLogs - Log data displayed by Scope viewer

Description

Simulink software creates instances of this class to log data displayed on Scope viewers (see Visualizing Simulation Results in the Simulink documentation). 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 labeled Axes1, Axes2, etc. The value of each axes property is itself a Simulink.ScopeDataLogs object that contains Simulink.Timeseries objects, one for each signal displayed on the axes. The time series objects contain the signal data displayed on the axes.

Consider, for example, the following model (open):

This model displays signals out1 and out2 on a scope viewer that has only one set of axes.

The model enables data logging for the scope viewer under the variable name ScopeData and for the model as a whole under the default variable name logsout.

After simulation of the model, the MATLAB workspace contains a Simulink.ModelDataLogs object named logsout containing a Simulink.ScopeDataLogs object that in turn contains a Simulink.ScopeDataLogs object that contains Simulink.Timeseries objects that contain the times series data for signals out1 and out 2.

You can use Simulink data object dot notation to access the data, e.g.,

>> logsout.ScopeData.axes1
 
ans =
 
Simulink.ScopeDataLogs (axes1):
  Name                   Elements  Simulink Class

  out1                      1      Timeseries
  out2                      1      Timeseries
  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS