12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

findobjPurpose2findobjLocate graphics objectsSyntaxDescriptionh = findobjh = findobj('PropertyName',PropertyValue,...)h = findobj(objhandles,...)h = findobj(objhandles,'flat','PropertyName',PropertyValue,...)findobj locates graphics objects and returns their handles. You can limit thesearch to objects with particular property values and along specific branches ofthe hierarchy.h = findobj returns the handles of the root object and all its descendants.h = findobj('PropertyName',PropertyValue,...) returns the handles ofall graphics objects having the property PropertyName, set to the valuePropertyValue. You can specify more than one property/value pair, in whichcase, findobj returns only those objects having all specified values.h = findobj(objhandles,...) restricts the search to objects listed inobjhandles and their descendants.h = findobj(objhandles,'flat','PropertyName',PropertyValue,...)restricts the search to those objects listed in objhandles and does not searchdescendants.Remarksfindobj returns an error if a handle refers to a non-existent graphics object.Findobj correctly matches any legal property value. For example,findobj('Color','r')finds all objects having a Color property set to red, r, or [1 0 0].When a graphics object is a descendant of more than one object identified inobjhandles, <strong>MATLAB</strong> searches the object each time findobj encounters itshandle. Therefore, implicit references to a graphics object can result in itshandle being returned multiple times.ExamplesFind all line objects in the current axes:h = findobj(gca,'Type','line')2-198

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!