Main Content

hasDesignRangeSpecification

Determine whether parameter has design range

Syntax

hasDesignRange = hasDesignRangeSpecification(fcnName,paramName)

Description

hasDesignRange = hasDesignRangeSpecification(fcnName,paramName) returns true if the parameter, param_name in function, fcn, has a design range specified.

Input Arguments

expand all

Function name, specified as a string.

Example: ‘dti’

Data Types: char

Parameter name, specified as a string.

Example: ‘dti’

Data Types: char

Output Arguments

expand all

Parameter has design range, returned as a boolean.

Data Types: logical

Examples

Verify That a Parameter Has a Design Range Specification

% Set up the fixed-point configuration object
cfg = coder.config('fixpt');
cfg.TestBenchName = 'dti_test';
cfg.addDesignRangeSpecification('dti', 'u_in', -1.0, 1.0);
cfg.ComputeDerivedRanges = true; 
% Verify that the 'dti' function parameter 'u_in' has design range
hasDesignRanges = cfg.hasDesignRangeSpecification('dti','u_in')
hasDesignRanges =

     1