Main Content

getDesignRangeSpecification

获取参数的设计范围设定

语法

[designMin, designMax] = getDesignRangeSpecification(fcnName,paramName)

说明

[designMin, designMax] = getDesignRangeSpecification(fcnName,paramName) 获取在函数 fcnName 中为参数 paramName 指定的最小值和最大值。

输入参数

全部展开

函数名称,指定为字符串。

数据类型: char

参数名称,指定为字符串。

数据类型: char

输出参数

全部展开

允许此参数使用的最小值,指定为双精度标量值。

数据类型: double

允许此参数使用的最大值,指定为双精度标量值。

数据类型: double

示例

获取设计范围设定

% 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; 
% Get the  design range for the 'dti' function parameter 'u_in' 
[designMin, designMax] = cfg.getDesignRangeSpecification('dti','u_in')
designMin =

    -1


designMax =

     1