Main Content

saturationOverflows

Get results where saturation occurred

Description

example

results = saturationOverflows(converter,RunName) returns all results in RunName, for the model specified by the DataTypeWorkflow.Converter object, converter, that saturated during simulation.

Examples

collapse all

This example shows how to get saturation results for the specified run of a DataTypeWorkflow.Converter object.

Open the fxpdemo_feedback model.

open_system('fxpdemo_feedback');

Create a DataTypeWorkflow.Converter object for the Controller subsystem.

converter = DataTypeWorkflow.Converter('fxpdemo_feedback/Controller');

Simulate the model and store the results in a run titled InitialRun.

converter.CurrentRunName = 'InitialRun';
simulateSystem(converter);

Determine if there were any overflows in the run.

saturations = saturationOverflows(converter,'InitialRun')
saturations = 

  Result with properties:

           ResultName: 'fxpdemo_feedback/Controller/Up Cast'
    SpecifiedDataType: 'fixdt(1,16,14)'
     CompiledDataType: 'fixdt(1,16,14)'
     ProposedDataType: ''
                Wraps: []
          Saturations: 23
          WholeNumber: 0
               SimMin: -2
               SimMax: 1.9999
           DerivedMin: []
           DerivedMax: []
              RunName: 'InitialRun'
             Comments: {'An output data type cannot be specified on this result. The output type is the same as the input type.'}
            DesignMin: []
            DesignMax: []

A saturation occurs in the Up Cast block of the Controller subsystem during the simulation. There are no wrapping overflows.

Input Arguments

collapse all

Converter object for the system under design, specified as a DataTypeWorkflow.Converter object.

Name of run to look for saturations in, specified as a character vector.

Example: saturations = saturationOverflows(converter,'Run 1')

Data Types: char

Output Arguments

collapse all

Results that saturated, returned as a DataTypeWorkflow.Result object.

Version History

Introduced in R2014b