Main Content

displayfeasiblesolutions

クラス: FunctionApproximation.LUTSolution
名前空間: FunctionApproximation

関数の近似で見つかったすべての実行可能解の表示

構文

displayfeasiblesolutions(solution)

説明

displayfeasiblesolutions(solution) は、近似プロセスで見つかった実行可能解を、最適解も含めてすべて表示します。実行可能解は、関連付けられた FunctionApproximation.Options オブジェクトで定義された制約を満たす元の FunctionApproximation.Problem オブジェクトに対する解と定義されます。

入力引数

すべて展開する

関連付けられているすべての実行可能解を表示する FunctionApproximation.LUTSolution オブジェクト。

すべて展開する

近似する数学関数を定義する FunctionApproximation.Problem オブジェクトを作成します。その後、solve メソッドを使用して FunctionApproximation.LUTSolution オブジェクトを取得します。

近似プロセスで見つかったすべての実行可能解を displayfeasiblesolutions メソッドを使用して表示します。

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"
displayfeasiblesolutions(solution)
|    ID |   Memory (bits) |   ConstraintMet |      Table Size | Breakpoints WLs |    TableData WL |   BreakpointSpecification |             Error(Max,Current) | 
|     2 |             864 |               1 |              52 |              16 |              16 |           EvenPow2Spacing |     7.812500e-03, 1.978726e-03 |
|     4 |             560 |               1 |              33 |              16 |              16 |               EvenSpacing |     7.812500e-03, 4.817965e-03 |
|     7 |             496 |               1 |              29 |              16 |              16 |               EvenSpacing |     7.812500e-03, 6.288182e-03 |
|     8 |             464 |               1 |              27 |              16 |              16 |               EvenSpacing |     7.812500e-03, 7.324035e-03 |
|    10 |             704 |               1 |              22 |              16 |              16 |            ExplicitValues |     7.812500e-03, 7.323370e-03 |

Best Solution
|    ID |   Memory (bits) |   ConstraintMet |      Table Size | Breakpoints WLs |    TableData WL |   BreakpointSpecification |             Error(Max,Current) |
|     8 |             464 |               1 |              27 |              16 |              16 |               EvenSpacing |     7.812500e-03, 7.324035e-03 |

バージョン履歴

R2018a で導入