Navigation

Operators and Keywords

Function List:

C++ API

: parent = ancestor (h, type)
: parent = ancestor (h, type, "toplevel")

Return the first ancestor of handle object h whose type matches type, where type is a character string.

If type is a cell array of strings, return the first parent whose type matches any of the given type strings.

If the handle object h itself is of type type, return h.

If "toplevel" is given as a third argument, return the highest parent in the object hierarchy that matches the condition, instead of the first (nearest) one.

See also: findobj, findall, allchild.

Package: octave