Container for subsystem's signal data logs


    Note:   The Simulink.SubsysDataLogs class is used in conjunction with the ModelDataLogs logging data format. The ModelDataLogs format is supported for backwards compatibility. The ModelDataLogs format will be removed in a future release.

    For new models, use the Dataset logging format.

Simulink® software creates instances of this class to contain logs for signals belonging to a subsystem (see Export Signal Data Using Signal Logging). Objects of this class have a variable number of properties. The first property, named Name, is the name of the subsystem whose log data this object contains. The remaining properties are signal log or signal log container objects containing the data logged for the subsystem specified by this object's Name property.

Consider, for example, the following model.

After simulation of this model, the MATLAB® workspace contains a Simulink.ModelDataLogs object, named logsout, that contains a Simulink.SubsysDataLogs object, named Gain, that contains the log data for signals a and m in the subsystem named Gain.

>> logsout.Gain
ans =
Simulink.SubsysDataLogs (Gain):
  Name                   elements  Simulink Class

  a                         1      Timeseries
  m                         2      TsArray

You can use either fully qualified log names or the unpack command to access the signal logs contained by a SubsysDataLogs object. For example, to access the amplitudes logged for signal a in the preceding example, you could enter the following at the MATLAB command line:

>> data = logsout.Gain.a.Data;


>> logsout.unpack('all');
data = a.Data;

Introduced before R2006a

Was this topic helpful?