Main Content

getValue

データ ディクショナリ エントリの値を返す

説明

entryValue = getValue(entryObj) は、データ ディクショナリ エントリ entryObj (Simulink.data.dictionary.Entry オブジェクト) の値を返します。

ブロック パラメーター値をスイープする目的でプログラムにより変数にアクセスするには、データ ディクショナリのプログラム インターフェイス経由で変数を変更する代わりに、Simulink.SimulationInput オブジェクトの使用を検討します。ブロック パラメーター値の最適化、推定およびスイープを参照してください。

すべて折りたたむ

データ ディクショナリ エントリ fuelFlowfuelFlowObj という名前の Simulink.data.dictionary.Entry オブジェクトで表します。fuelFlow はデータ ディクショナリ myDictionary_ex_API.sldd で定義されています。

myDictionaryObj = Simulink.data.dictionary.open('myDictionary_ex_API.sldd');
dDataSectObj = getSection(myDictionaryObj,'Design Data');
fuelFlowObj = getEntry(dDataSectObj,'fuelFlow');

エントリ fuelFlow の値を返し、その値を変数 fuelFlowValue に代入します。

fuelFlowValue = getValue(fuelFlowObj)
fuelFlowValue =

   237

入力引数

すべて折りたたむ

ターゲットのデータ ディクショナリ エントリ。Simulink.data.dictionary.Entry オブジェクトとして指定します。この関数を使用する前に、関数 getEntry などを使用してターゲットのエントリを Simulink.data.dictionary.Entry オブジェクトで表しておきます。

バージョン履歴

R2015a で導入