solve
クラス: FunctionApproximation.Problem
パッケージ: FunctionApproximation
関数の近似の問題に対する最適化された解の計算
構文
solution = solve(problem)
説明
は、solution
= solve(problem
)FunctionApproximation.Problem
オブジェクト problem
で定義された最適化の問題の解を求め、最適化された結果 solution
を FunctionApproximation.LUTSolution
オブジェクトとして返します。
入力引数
problem
— 最適化の問題
FunctionApproximation.Problem
最適化の問題。近似する関数または Math Function ブロックか最適化する Lookup Table ブロック、および最適化プロセスで使用するその他のパラメーターと制約を定義する FunctionApproximation.Problem
オブジェクトとして指定します。
出力引数
solution
— 近似の解
FunctionApproximation.LUTSolution
オブジェクト
近似の解。FunctionApproximation.LUTSolution
オブジェクトとして返されます。
例
数学関数の近似
FunctionApproximation.Problem
オブジェクトを作成し、近似する数学関数を指定します。
problem = FunctionApproximation.Problem('log')
problem = FunctionApproximation.Problem with properties FunctionToApproximate: @(x)log(x) NumberOfInputs: 1 InputTypes: "numerictype(1,16,10)" InputLowerBounds: 0.6250 InputUpperBounds: 15.6250 OutputType: "numerictype(1,16,13)" Options: [1×1 FunctionApproximation.Options]
他のオプションについてはすべて既定値を使用します。
solve
メソッドを使用して関数の近似を生成します。
solution = solve(problem)
| ID | Memory (bits) | ConstraintMet | Table Size | Breakpoints WLs | TableData WL | BreakpointSpecification | Error(Max,Current) | | 0 | 64 | 0 | 2 | 16 | 16 | EvenPow2Spacing | 7.812500e-03, 1.178125e+00 | | 1 | 1984 | 1 | 122 | 16 | 16 | EvenPow2Spacing | 7.812500e-03, 4.192649e-03 | | 2 | 1024 | 0 | 62 | 16 | 16 | EvenPow2Spacing | 7.812500e-03, 1.416713e-02 | | 3 | 1968 | 1 | 121 | 16 | 16 | EvenPow2Spacing | 7.812500e-03, 4.192649e-03 | | 4 | 64 | 0 | 2 | 16 | 16 | EvenSpacing | 7.812500e-03, 1.138984e+00 | | 5 | 416 | 1 | 13 | 16 | 16 | ExplicitValues | 7.812500e-03, 7.310789e-03 | Best Solution | ID | Memory (bits) | ConstraintMet | Table Size | Breakpoints WLs | TableData WL | BreakpointSpecification | Error(Max,Current) | | 5 | 416 | 1 | 13 | 16 | 16 | ExplicitValues | 7.812500e-03, 7.310789e-03 | solution = FunctionApproximation.LUTSolution with properties ID: 5 Feasible: "true"
この後、approximate
メソッドを使用してルックアップ テーブルの近似を含むサブシステムを生成できます。
バージョン履歴
R2018a で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)