MATLAB 帮助中心
在参数中添加设计范围设定
addDesignRangeSpecification(fcnName,paramName,designMin, designMax)
addDesignRangeSpecification(fcnName,paramName,designMin, designMax) 指定允许函数 fcnName 中的参数 paramName 使用的最小值和最大值。定点转换过程使用此设计范围信息来派生代码中的下游变量的范围。
fcnName
paramName
designMin
designMax
全部展开
函数名称,指定为字符串。
数据类型: char
char
参数名称,指定为字符串。
允许此参数使用的最小值,指定为双精度标量值。
数据类型: double
double
允许此参数使用的最大值,指定为双精度标量值。
设置定点配置对象。
cfg = coder.config('fixpt'); cfg.TestBenchName = 'dti_test'; cfg.addDesignRangeSpecification('dti', 'u_in', -1.0, 1.0) cfg.ComputeDerivedRanges = true;
派生范围和生成定点代码。
fiaccel -float2fixed cfg dti;
coder.FixPtConfig | fiaccel | hasDesignRangeSpecification | removeDesignRangeSpecification | clearDesignRangeSpecifications | getDesignRangeSpecification
coder.FixPtConfig
fiaccel
hasDesignRangeSpecification
removeDesignRangeSpecification
clearDesignRangeSpecifications
getDesignRangeSpecification
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处