メインコンテンツ

getEntry

R2026b

クラス: coder.dictionary.Section
名前空間: coder.dictionary

Embedded Coder ディクショナリの定義を表す coder.dictionary.Entry オブジェクトを返す

構文

entryObj = getEntry(sectionObj,defName)

説明

entryObj = getEntry(sectionObj,defName) は、セクション sectionObj (coder.dictionary.Section オブジェクト) 内にある defName という名前の Embedded Coder ディクショナリの定義を表す coder.dictionary.Entry オブジェクトを返します。

入力引数

すべて展開する

コード定義が含まれている Embedded Coder ディクショナリ セクション。coder.dictionary.Section オブジェクトとして指定します。セクション名はコード定義の種類を識別します。

Embedded Coder ディクショナリの定義の名前。文字ベクトルまたは string スカラーとして指定します。

例: 'StorageClass2'

出力引数

すべて展開する

Embedded Coder ディクショナリ エントリ。coder.dictionary.Entry オブジェクトとして返されます。エントリは、Embedded Coder ディクショナリ セクション内のコード定義を表します。

例

すべて展開する

モデル RollAxisAutopilot を開き、coder.Dictionary オブジェクトを使用して Embedded Coder ディクショナリを表します。このオブジェクトを使用してディクショナリの [ストレージ クラス] セクションにアクセスします。このセクションには、ストレージ クラスの定義が格納されます。

openExample('RollAxisAutopilot')
coderDictionary = coder.dictionary.open('RollAxisAutopilot');

Embedded Coder ディクショナリの [ストレージ クラス] セクションを表す coder.dictionary.Section オブジェクトを作成します。

storageClassesSect = getSection(coderDictionary, 'StorageClasses');

coder.dictionary.Entry オブジェクトを使用して、例のストレージ クラス ParamStruct を表します。

entryObj = getEntry(storageClassesSect,'ParamStruct')
Entry with properties:

          Name: 'ParamStruct'
    DataSource: 'RollAxisAutopilot'

バージョン履歴

R2019b で導入