도움말 센터도움말 센터
이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
객체의 부모 식별
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
다음 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:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office