帮助中心帮助中心
在参数中添加设计范围设定
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
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office