Skip to Main Content Skip to Search
Product Documentation

Simulink.SubsysDataLogs - Container for subsystem's signal data logs

Description

Simulink software creates instances of this class to contain logs for signals belonging to a subsystem (see Exporting 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;

or

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

See Also

Importing and Exporting Simulation Data, Simulink.ModelDataLogs, Simulink.ScopeDataLogs, Simulink.Timeseries, Simulink.TsArray, Simulink.SimulationData.Dataset, who, whos, unpack

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

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