このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
revert
説明
revert(
は、関数 compressionResult
)FunctionApproximation.compressLookupTables
で圧縮された Lookup Table ブロックを元の状態に戻します。
revert(
は、compressionResult
, index
)index
で指定されたインデックスのルックアップ テーブルを戻します。
例
システム内のすべての Lookup Table ブロックの圧縮
この例では、システム内のすべての Lookup Table ブロックを圧縮する方法を示します。
圧縮するルックアップ テーブルを含むモデルを開きます。
system = 'sldemo_fuelsys';
open_system(system)
関数 FunctionApproximation.compressLookupTables
を使用してモデル内のすべてのルックアップ テーブルを圧縮します。変更されたすべてのブロックとそれぞれのメモリ削減量が出力に示されます。
compressionResult = FunctionApproximation.compressLookupTables(system)
- Found 5 supported lookup tables - Percent reduction in memory for compressed solution - 2.37% for sldemo_fuelsys/fuel_rate_control/airflow_calc/Pumping Constant - 2.37% for sldemo_fuelsys/fuel_rate_control/control_logic/Throttle.throttle_estimate/Throttle Estimation - 3.55% for sldemo_fuelsys/fuel_rate_control/control_logic/Speed.speed_estimate/Speed Estimation - 6.38% for sldemo_fuelsys/fuel_rate_control/control_logic/Pressure.map_estimate/Pressure Estimation - 9.38% for sldemo_fuelsys/fuel_rate_control/airflow_calc/Ramp Rate Ki compressionResult = LUTCompressionResult with properties: MemoryUnits: bytes MemoryUsageTable: [5x5 table] NumLUTsFound: 5 NumImprovements: 5 TotalMemoryUsed: 6024 TotalMemoryUsedNew: 5796 TotalMemorySavings: 228 TotalMemorySavingsPercent: 3.7849 SUD: 'sldemo_fuelsys' WordLengths: [8 16 32] FindOptions: [1x1 Simulink.internal.FindOptions] Display: 1
関数 replace
を使用して、各 Lookup Table ブロックを元のバージョンと圧縮されたバージョンのルックアップ テーブルを含むブロックに置き換えます。
replace(compressionResult);
ルックアップ テーブルは関数 revert
を使用して元の状態に戻すことができます。
revert(compressionResult);
入力引数
compressionResult
— ルックアップ テーブルの圧縮の結果
LUTCompressionResult
オブジェクト
ルックアップ テーブルの圧縮の結果。LUTCompressionResult
オブジェクトとして指定します。
index
— 元に戻す Lookup Table ブロックのインデックス
スカラー | ベクトル
システム内の元に戻す Lookup Table ブロックのインデックス。整数値のスカラーまたはベクトルとして指定します。
各ルックアップ テーブルのインデックスは LUTCompressionResult
オブジェクトの MemoryUsageTable
プロパティの ID
列に対応します。
データ型: double
バージョン履歴
R2020a で導入
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)