Contenido principal

clearTolerances

Class: fxpOptimizationOptions

Remove tolerances from optimization options object

Since R2026a

Description

clearTolerances(options) clears all tolerances from the fxpOptimizationOptions object options.

example

clearTolerances(options,blockPath,portIndex) clears the tolerance specified by blockPath and portIndex.

example

Input Arguments

expand all

fxpOptimizationOptions object from which to remove tolerance specifications.

Path to the block from which to clear a tolerance, specified as a character vector.

Data Types: char | string

Index of output port of the block specified by blockPath for which you want to clear a tolerance, specified as a scalar integer.

Data Types: double

Examples

expand all

Load the system for which you want to optimize the data types.

load_system('ex_auto_gain_controller');

Create an fxpOptimizationOptions object with default property values.

options = fxpOptimizationOptions;

To specify a required numeric tolerance to use during the optimization process, use the addTolerance method of the fxpOptimizationOptions object. To specify several tolerance constraints, call the method once per constraint. You can specify either relative, or absolute tolerance constraints.

addTolerance(options,'ex_auto_gain_controller/output_signal',1,'AbsTol',5e-2);
addTolerance(options,'ex_auto_gain_controller/input_signal',1,'RelTol',1e-2);

Use the showTolerances method to display all tolerance constraints added to a specified fxpOptimizationOptions object.

showTolerances(options)
ans =

  2×4 table

                      Path                       Port_Index    Tolerance_Type    Tolerance_Value
    _________________________________________    __________    ______________    _______________

    {'ex_auto_gain_controller/output_signal'}        1           {'AbsTol'}           0.05      
    {'ex_auto_gain_controller/input_signal' }        1           {'RelTol'}           0.01      

In R2026a: Use the clearTolerances method to remove a tolerance from the options object.

clearTolerances(options,'ex_auto_gain_controller/input_signal', 1);
showTolerances(options)
ans =

  1×4 table

                      Path                       Port_Index    Tolerance_Type    Tolerance_Value
    _________________________________________    __________    ______________    _______________

    {'ex_auto_gain_controller/output_signal'}        1           {'AbsTol'}           0.05      

In R2026a: Use the clearTolerances method to remove all tolerances from the options object.

clearTolerances(options);
showTolerances(options)
ans =

  0×4 empty table

    Path    Port_Index    Tolerance_Type    Tolerance_Value
    ____    __________    ______________    _______________

Version History

Introduced in R2026a