このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
getErrorValue
クラス: FunctionApproximation.LUTSolution
名前空間: FunctionApproximation
ルックアップ テーブル近似の誤差の合計の取得
構文
memory = getErrorValue(solution)
説明
は、memory
= getErrorValue(solution
)solution
で指定されたルックアップ テーブル近似の誤差の合計を返します。
入力引数
solution
— 誤差を取得する解
FunctionApproximation.LUTSolution
オブジェクト
誤差を取得する解。FunctionApproximation.LUTSolution
オブジェクトとして指定します。
出力引数
error
— ルックアップ テーブル近似の誤差の合計
struct
ルックアップ テーブル近似の誤差の合計。struct として返されます。
struct には 2 つのフィールドが含まれています。MaxErrorInSolution
フィールドは、元の関数またはブロックとルックアップ テーブル近似との最大差異を指定します。ErrorUpperBound
フィールドは、FunctionApproximation.Options
オブジェクトについて指定された許容誤差に従って、受容可能な最大誤差を表示します。
例
ルックアップ テーブル近似の合計誤差の計算
近似する数学関数を定義する FunctionApproximation.Problem
オブジェクトを作成します。その後、solve
メソッドを使用して FunctionApproximation.LUTSolution
オブジェクトを取得します。
getErrorValue
メソッドを使用して FunctionApproximation.LUTSolution
オブジェクトの合計誤差を計算します。
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"
error = getErrorValue(solution)
error = struct with fields: MaxErrorInSolution: 0.0073 ErrorUpperBound: 0.0078
バージョン履歴
R2019a で導入
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)