Simulink.SubsysDataLogs - Log signals in subsystem

Description

Simulink software creates instances of this class to contain logs for signals belonging to a subsystem (see Logging Signals in the Simulink documentation). 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 g in the subsystem named Gain.

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

  a                         1      Timeseries
  g                         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;

or

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

See Also

Simulink.ModelDataLogs, Simulink.Timeseries, Simulink.TsArray, unpack

  


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