hasGroup
説明
hasGroup(
は、設定グループ parentgroup
,name
)parentgroup
が name
という設定グループを含む場合に 1
を返します。それ以外の場合、hasGroup
は 0
を返します。
例
設定グループを追加する前のチェック
設定グループを追加する前に、それが存在するかどうかをチェックします。
関数 settings
を使用して設定ツリーのルートにアクセスしてから、設定グループ mysettings
を作成します。
s = settings;
addGroup(s,'mysettings');
myothersettings
という設定グループを mysettings
に追加する前に、それが存在するかどうかをチェックします。
if hasGroup(s.mysettings,'myothersettings') == 0 addGroup(s.mysettings,'myothersettings'); end s.mysettings
ans = SettingsGroup 'mysettings' with properties: myothersettings: [1×1 SettingsGroup]
入力引数
バージョン履歴
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)