Calculate total memory used by a lookup table approximation
memory = totalmemoryusage(solution,units)
solution— Solution to get memory of
Solution to get memory of, specified as a
units— Units in which to display the total memory used
Units in which to display the total memory used, specified as a character vector.
memory— total memory used by a lookup table approximation
Total memory used by a lookup table approximation, returned as a scalar.
object defining a math function to approximate. Then, use the
solve method to get a
Calculate the total memory used by the
FunctionApproximation.LUTSolution object using the
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"
ans = 58