このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
getParent
オブジェクトの親の特定
説明
例
ステートの親の特定
このチャートでは、ステート A1
の親はステート A
です。ステート A
の親はチャートです。
モデルを開き、チャートの Stateflow.Chart
オブジェクトにアクセスします。
open_system("sfHierarchyAPIExample") ch = find(sfroot,"-isa","Stateflow.Chart");
A1
という名前の Stateflow.State
オブジェクトを検索します。
sA1 = find(sfroot,"-isa","Stateflow.State",Name="A1");
ステート A1
の親を特定します。親の名前を表示します。
parent = getParent(sA1); parent.Name
ans = 'A'
ステート A
の親を特定します。親の名前を表示します。
grandparent = getParent(parent); grandparent.Name
ans = 'Chart'
入力引数
object
— オブジェクト
Stateflow.State
オブジェクト | Stateflow.Box
オブジェクト | Stateflow.Function
オブジェクト | ...
Stateflow チャート、State Transition Table ブロック、Truth Table ブロック、または MATLAB Function ブロック内のオブジェクト。次のいずれかのタイプの Stateflow API オブジェクトとして指定します。
バージョン履歴
R2006a より前に導入
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)