Simulink Reference Previous page   Next Page
Simulink.ModelDataLogs

Container for a model's signal data logs.

Description

Simulink creates instances of this class to contain signal logs that it creates while simulating a model (see Logging Signals in the "Working with Signals" chapter of Using Simulink). In particular, Simulink creates an instance of this class for a top-level model and for each model referenced by the top-level model that contains signals to be logged. Simulink assigns the ModelDataLogs object for the top-level model to a variable in the MATLAB workspace. The name of the variable is the name specified in the Signal logging name field on the Data Import/Export pane of the model's Configuration Parameters dialog box. The default value is logsout.

A ModelDataLogs object has a variable number of properties. The first property, named Name, specifies the name of the model whose signal data the object contains or, if the model is a referenced model, the name of the Model block that references the model. The remaining properties reference objects that contain signal data logged during simulation of the model. The objects may be instances of any of the following types of objects:

The names of the properties identify the data being logged as follows:

Consider, for example, the following model.

As indicated by the testpoint icons, this model specifies that Simulink should log the signals named step and scope in the model's root system and the signal named clk in the subsystem named Delayed Out. After simulation of this model, the MATLAB workspace contains the following variable:

The logsout variable contains the signal data logged during the simulation. You can use fully qualified object names or the Simulink unpack command to access the signal data stored in logsout. For example, to access the amplitudes of the clk signal in the Delayed Out subsystem, enter

or

See Also

Simulink.Timeseries, Simulink.TsArray, Simulink.SubsysDataLogs, Simulink.ScopeDataLogs, unpack


Previous page  Simulink.ConfigSet Simulink.ModelWorkspace Next page

© 1994-2005 The MathWorks, Inc.