MATLAB 帮助中心
计算查找表逼近使用的总内存量
memory = totalmemoryusage(solution,units)
memory = totalmemoryusage(solution,units) 返回由 solution 指定的查找表逼近使用的总内存量,单位由 units 指定。
memory
solution
units
全部展开
FunctionApproximation.LUTSolution
要获取内存的解,指定为 FunctionApproximation.LUTSolution 对象。
'bits'
'bytes'
'GiB'
'KiB'
'MiB'
显示总内存使用量所用的单位,指定为字符向量。
数据类型: char
char
查找表逼近使用的总内存量,以标量形式返回。
创建一个 FunctionApproximation.Problem 对象,用于定义要逼近的数学函数。然后,使用 solve 方法获取一个 FunctionApproximation.LUTSolution 对象。
FunctionApproximation.Problem
solve
使用 totalmemoryusage 方法计算 FunctionApproximation.LUTSolution 对象使用的总内存量。
totalmemoryusage
problem = FunctionApproximation.Problem('sin')
problem = FunctionApproximation.Problem with properties FunctionToApproximate: @(x)sin(x) NumberOfInputs: 1 InputTypes: "numerictype(0,16,13)" InputLowerBounds: 0 InputUpperBounds: 6.2832 OutputType: "numerictype(1,16,14)" Options: [1×1 FunctionApproximation.Options]
solution = solve(problem)
solution = FunctionApproximation.LUTSolution with properties ID: 8 Feasible: "true"
totalmemoryusage(solution, 'bytes')
ans = 58
在 R2018a 中推出
FunctionApproximation.Options
FunctionApproximation.LUTMemoryUsageCalculator
compare
solutionfromID
displayfeasiblesolutions
displayallsolutions
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 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处