MATLAB ヘルプ センター
オブジェクトの親の特定
parent = getParent(object)
parent = getParent(object) は、Stateflow® チャート、State Transition Table ブロック、Truth Table ブロック、または MATLAB® Function ブロック内のオブジェクトの親を返します。
parent
object
例
すべて折りたたむ
この例では次を使用します。
このチャートでは、ステート A1 の親はステート A です。ステート A の親はチャートです。
A1
A
モデルを開き、チャートの Stateflow.Chart オブジェクトにアクセスします。
Stateflow.Chart
open_system("sfHierarchyAPIExample") ch = find(sfroot,"-isa","Stateflow.Chart");
A1 という名前の Stateflow.State オブジェクトを検索します。
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'
Stateflow.Box
Stateflow.Function
Stateflow チャート、State Transition Table ブロック、Truth Table ブロック、または MATLAB Function ブロック内のオブジェクト。次のいずれかのタイプの Stateflow API オブジェクトとして指定します。
Stateflow.Annotation
Stateflow.AtomicBox
Stateflow.AtomicSubchart
Stateflow.Data
Stateflow.EMFunction
Stateflow.Event
Stateflow.Junction
Stateflow.Message
Stateflow.Port
Stateflow.SimulinkBasedState
Stateflow.SLFunction
Stateflow.Transition
Stateflow.TruthTable
R2006a より前に導入
find
getChildren
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
ヨーロッパ
アジア太平洋地域
最寄りの営業オフィスへのお問い合わせ