Main Content

totalmemoryusage

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

ルックアップ テーブルの近似で使用される合計メモリの計算

構文

memory = totalmemoryusage(solution,units)

説明

memory = totalmemoryusage(solution,units) は、solution で指定されたルックアップ テーブルの近似で使用される合計メモリを units で指定された単位で返します。

入力引数

すべて展開する

メモリを取得する解。FunctionApproximation.LUTSolution オブジェクトとして指定します。

使用される合計メモリを表示する単位。文字ベクトルとして指定します。

データ型: char

出力引数

すべて展開する

ルックアップ テーブルの近似で使用される合計メモリ。スカラーとして返されます。

すべて展開する

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

FunctionApproximation.LUTSolution オブジェクトで使用される合計メモリは、totalmemoryusage メソッドを使用して計算されます。

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"
totalmemoryusage(solution, 'bytes')
ans =

    58

バージョン履歴

R2018a で導入