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 명령 창에 입력하십시오. 웹 브라우저는 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)