exist
クラス: coder.dictionary.Section
名前空間: coder.dictionary
構文
tf = exist(sectionObj,defName)
説明
は、tf
= exist(sectionObj
,defName
)sectionObj
で表される Embedded Coder ディクショナリのセクションに名前 defName
の定義が含まれている場合に true
を返します。
入力引数
sectionObj
— Embedded Coder ディクショナリのセクション
coder.dictionary.Section
オブジェクト
Embedded Coder ディクショナリのセクション。coder.dictionary.Section
オブジェクトとして指定します。
defName
— Embedded Coder ディクショナリの定義の名前
文字ベクトル | string スカラー
Embedded Coder ディクショナリの定義の名前。文字ベクトルまたは string スカラーとして指定します。
例: 'StorageClass2'
出力引数
tf
— true または false の結果
1
| 0
| logical 配列
true または false の結果。データ型 logical
の 1
または 0
として返されます。
例
ストレージ クラスが存在するかどうかの確認
モデル RollAxisAutopilot
を開き、coder.Dictionary
オブジェクトを使用して Embedded Coder ディクショナリを表します。このオブジェクトを使用してディクショナリの [ストレージ クラス] セクションにアクセスします。このセクションには、ストレージ クラスの定義が格納されます。
openExample('RollAxisAutopilot') coderDictionary = coder.dictionary.open('RollAxisAutopilot');
Embedded Coder ディクショナリの [ストレージ クラス] セクションを表す coder.dictionary.Section
オブジェクトを作成します。
storageClassesSect = getSection(coderDictionary, 'StorageClasses');
[ストレージ クラス] セクションにサンプルのストレージ クラス SignalStruct
が含まれているかどうかを確認します。
exist(storageClassesSect,'SignalStruct')
ans = logical 1
ストレージ クラスを削除し、定義がまだ存在しているかどうかを確認します。
deleteEntry(storageClassesSect,'SignalStruct'); exist(storageClassesSect,'SignalStruct')
ans = logical 0
バージョン履歴
R2019b で導入
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)