solve
Class: FunctionApproximation.Problem
Namespace: FunctionApproximation
Solve for optimized solution to function approximation problem
Syntax
solution = solve(problem)
Description
solves the optimization problem defined by the solution = solve(problem)FunctionApproximation.Problem object, problem, and
returns the optimized result, solution, as a FunctionApproximation.LUTSolution object.
Input Arguments
Optimization problem specified as a
FunctionApproximation.Problem object defining the
function or Math Function block to approximate, or the
Lookup Table block to optimize, and other parameters and
constraints to use during the optimization process.
Output Arguments
Approximation solution, returned as a FunctionApproximation.LUTSolution object.
Examples
Create a FunctionApproximation.Problem object, specifying a math function to approximate.
problem = FunctionApproximation.Problem('log')problem =
1×1 FunctionApproximation.Problem with properties:
FunctionToApproximate: @(x)log(x)
NumberOfInputs: 1
NumberOfOutputs: 1
InputTypes: "numerictype(1,16,10)"
InputLowerBounds: 0.6250
InputUpperBounds: 15.6250
OutputType: "numerictype(1,16,13)"
Options: [1×1 FunctionApproximation.Options]
Use the solve method to generate an approximation of the function
solution = solve(problem)
Searching for fixed-point solutions. | ID | Memory (bits) | Feasible | Table Size | Breakpoints WLs | TableData WL | BreakpointSpecification | Error(Max,Current) | | 0 | 64 | 0 | 2 | 16 | 16 | EvenSpacing | 7.812500e-03, 1.020687e+00 | | 1 | 912 | 0 | 55 | 16 | 16 | EvenSpacing | 7.812500e-03, 1.687575e-02 | | 2 | 896 | 0 | 54 | 16 | 16 | EvenSpacing | 7.812500e-03, 1.737290e-02 | | 3 | 1776 | 1 | 109 | 16 | 16 | EvenSpacing | 7.812500e-03, 5.131055e-03 | | 4 | 1760 | 1 | 108 | 16 | 16 | EvenSpacing | 7.812500e-03, 5.169212e-03 | | 5 | 1328 | 1 | 81 | 16 | 16 | EvenSpacing | 7.812500e-03, 7.723356e-03 | | 6 | 1120 | 1 | 68 | 16 | 16 | EvenSpacing | 7.812500e-03, 7.723356e-03 | | 7 | 1008 | 1 | 61 | 16 | 16 | EvenSpacing | 7.812500e-03, 7.723356e-03 | | 8 | 960 | 1 | 58 | 16 | 16 | EvenSpacing | 7.812500e-03, 7.798586e-03 | | 9 | 928 | 0 | 56 | 16 | 16 | EvenSpacing | 7.812500e-03, 1.635354e-02 | | 10 | 944 | 0 | 57 | 16 | 16 | EvenSpacing | 7.812500e-03, 1.586526e-02 | | 11 | 704 | 0 | 42 | 16 | 16 | EvenSpacing | 7.812500e-03, 2.639592e-02 | | 12 | 688 | 0 | 41 | 16 | 16 | EvenSpacing | 7.812500e-03, 2.755002e-02 | | 13 | 832 | 0 | 50 | 16 | 16 | EvenSpacing | 7.812500e-03, 1.981209e-02 | | 14 | 480 | 0 | 28 | 16 | 16 | EvenSpacing | 7.812500e-03, 5.018443e-02 | | 15 | 464 | 0 | 27 | 16 | 16 | EvenSpacing | 7.812500e-03, 5.303877e-02 | | 16 | 720 | 0 | 43 | 16 | 16 | EvenSpacing | 7.812500e-03, 2.538244e-02 | | 17 | 512 | 0 | 30 | 16 | 16 | EvenSpacing | 7.812500e-03, 4.514940e-02 | | 18 | 736 | 0 | 44 | 16 | 16 | EvenSpacing | 7.812500e-03, 2.452795e-02 | | 19 | 848 | 0 | 51 | 16 | 16 | EvenSpacing | 7.812500e-03, 1.915421e-02 | | 20 | 64 | 0 | 2 | 16 | 16 | EvenPow2Spacing | 7.812500e-03, 7.831517e-01 | | 21 | 528 | 0 | 31 | 16 | 16 | EvenPow2Spacing | 7.812500e-03, 4.300416e-02 | | 22 | 352 | 1 | 11 | 16 | 16 | ExplicitValues | 7.812500e-03, 7.102135e-03 | | 23 | 352 | 0 | 11 | 16 | 16 | ExplicitValues | 7.812500e-03, 1.184082e-02 | | 24 | 352 | 0 | 11 | 16 | 16 | ExplicitValues | 7.812500e-03, 1.079952e-02 | | 25 | 416 | 1 | 13 | 16 | 16 | ExplicitValues | 7.812500e-03, 7.725618e-03 | | 26 | 1008 | 1 | 61 | 16 | 16 | EvenPow2Spacing | 7.812500e-03, 7.723356e-03 | Best Solution | ID | Memory (bits) | Feasible | Table Size | Breakpoints WLs | TableData WL | BreakpointSpecification | Error(Max,Current) | | 22 | 352 | 1 | 11 | 16 | 16 | ExplicitValues | 7.812500e-03, 7.102135e-03 |
solution =
1×1 FunctionApproximation.LUTSolution with properties:
ID: 22
Feasible: "true"
You can then use the approximate method to generate a subsystem containing the lookup table approximation.
Version History
Introduced in R2018a
See Also
Apps
Classes
FunctionApproximation.Problem|FunctionApproximation.Options|FunctionApproximation.LUTSolution|FunctionApproximation.LUTMemoryUsageCalculator
Functions
MATLAB Command
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.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)