Main Content

FunctionApproximation.LUTSolution Class

Namespace: FunctionApproximation

Optimized lookup table data or lookup table data approximating a math function

Description

A FunctionApproximation.LUTSolution object contains optimized lookup table data or lookup table data approximating a math function. To create a FunctionApproximation.LUTSolution object, use the solve method on a FunctionApproximation.Problem object. To generate a subsystem containing the lookup table approximate or the optimized lookup table, or to generate the lookup table as a MATLAB® function, use the approximate method of the FunctionApproximation.LUTSolution object.

You can save a FunctionApproximation.LUTSolution object to a MAT file and restore the solution later.

Construction

solution = solve(problem) solves the problem defined by the FunctionApproximation.Problem object, problem, and returns the approximation or optimization, solution, as a FunctionApproximation.LUTSolution object.

Input Arguments

expand all

Function to approximate, or lookup table to optimize, and the constraints to consider during the optimization, specified as a FunctionApproximation.Problem object.

Properties

expand all

ID of the solution, specified as a scalar integer.

This property is read-only.

Data Types: double

Whether the approximation or optimization specified by the FunctionApproximation.LUTSolution object, solution, meets the constraints specified in the FunctionApproximation.Problem object, problem, and its associated FunctionApproximation.Options.

This property is read-only.

Data Types: logical

All solutions found during the approximation, including infeasible solutions, specified as a vector of FunctionApproximation.LUTSolution objects.

This property is read-only.

All solutions meeting the specified constraints, specified as a vector of FunctionApproximation.LUTSolution objects.

This property is read-only.

If the original FunctionApproximation.Problem object specified a lookup table block to optimize, the PercentReduction property indicates the reduction in memory from the original lookup table. If the original FunctionApproximation.Problem object specified a math function or function handle, the PercentReduction is -Inf.

This property is read-only.

Data Types: double

FunctionApproximation.Problem object that the FunctionApproximation.LUTSolution object approximates.

This property is read-only.

Struct containing data related to lookup table approximation. The struct has the following fields.

  • BreakpointValues - Breakpoints of the lookup table

  • BreakpointDataTypes- Data type of the lookup table breakpoints

  • TableValues - Values in the lookup table

  • TableDataType - Data type of the table data

  • IsEvenSpacing - Boolean value indicating if the breakpoints are evenly spaced.

This property is read-only.

Methods

approximateGenerate a Lookup Table block or lookup table as a MATLAB function from a FunctionApproximation.LUTSolution
compareCompare numerical results of FunctionApproximation.LUTSolution to original function or lookup table
displayallsolutions Display all solutions found during function approximation
displayfeasiblesolutionsDisplay all feasible solutions found during function approximation
getErrorValueGet the total error of the lookup table approximation
replaceWithApproximateReplace block with the generated lookup table approximation
revertToOriginalRevert the block that was replaced by the approximation back to its original state
solutionfromID Access a solution found during the approximation process
totalmemoryusage Calculate total memory used by a lookup table approximation

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying Objects.

Version History

Introduced in R2018a