Main Content

clearTolerances

Clear all tolerances specified by a DataTypeWorkflow.ProposalSettings object

Description

example

clearTolerances(proposalSettings) clears the absolute, relative, and time tolerances of a proposalSettings object.

Examples

collapse all

This example shows how to apply and remove tolerances from signals in a system. In this example, you add tolerances to a DataTypeWorkflow.proposalSettings object, and then remove all tolerances from this object.

model = 'fxpdemo_feedback';
open_system(model);

Create a DataTypeWorkflow.ProposalSettings object.

propSettings = DataTypeWorkflow.ProposalSettings;

Add an absolute tolerance of 0.05 to the output of the Down Cast block in the Controller subsystem.

addTolerance(propSettings, 'fxpdemo_feedback/Controller/Down Cast',1,'AbsTol',5e-2);

Add a relative tolerance of 1% to the same signal.

addTolerance(propSettings, 'fxpdemo_feedback/Controller/Down Cast',1,'RelTol',1e-2);

Use showTolerances to see all tolerances associated with the proposal settings object.

showTolerances(propSettings)
                      Path                       Port_Index    Tolerance_Type    Tolerance_Value
    _________________________________________    __________    ______________    _______________

    {'fxpdemo_feedback/Controller/Down Cast'}        1           {'AbsTol'}           0.05      
    {'fxpdemo_feedback/Controller/Down Cast'}        1           {'RelTol'}           0.01      

Clear the tolerances stored in the ProposalSettings object.

clearTolerances(propSettings)

Using showTolerances, verify that there are no longer any tolerances stored in the ProposalSettings object.

showTolerances(propSettings)
    Path    Port_Index    Tolerance_Type    Tolerance_Value
    ____    __________    ______________    _______________


Input Arguments

collapse all

Object that contains proposal settings, specified as a DataTypeWorkflow.ProposalSettings object. A DataTypeWorkflow.ProposalSettings object specifies tolerances and settings to use during the data type proposal process.

Version History

Introduced in R2019a