28.12.2012 Views

Figure Properties - SERC

Figure Properties - SERC

Figure Properties - SERC

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

findobj<br />

2-836<br />

If a match occurs, findobj returns the object’s handle. See the regexp function<br />

for information on how MATLAB uses regular expressions.<br />

h = findobj(objhandles,...) restricts the search to objects listed in<br />

objhandles and their descendants.<br />

h = findobj(objhandles,'-depth',d,...) specified the depth of the search.<br />

The depth argument d controls how many levels under the handles in<br />

objhandles are traversed. Specifying d as inf to get the default behavior of all<br />

levels. Specify d as 0 to get the same behavior as using the flat argument.<br />

h = findobj(objhandles,'flat','PropertyName',PropertyValue,...)<br />

restricts the search to those objects listed in objhandles and does not search<br />

descendants.<br />

Remarks findobj returns an error if a handle refers to a nonexistent graphics object.<br />

findobj correctly matches any legal property value. For example,<br />

findobj('Color','r')<br />

finds all objects having a Color property set to red, r, or [1 0 0].<br />

When a graphics object is a descendant of more than one object identified in<br />

objhandles, MATLAB searches the object each time findobj encounters its<br />

handle. Therefore, implicit references to a graphics object can result in its<br />

handle being returned multiple times.<br />

Examples Find all line objects in the current axes:<br />

h = findobj(gca,'Type','line')<br />

Find all objects having a Label set to 'foo' and a String set to 'bar':<br />

h = findobj('Label','foo','-and','String','bar');<br />

Find all objects whose String is not 'foo' and is not 'bar':<br />

h = findobj('-not','String','foo','-not','String','bar');<br />

Find all objects having a String set to 'foo' and a Tag set to 'button one' and<br />

whose Color is not 'red' or 'blue':<br />

h = findobj('String','foo','-and','Tag','button one',...

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

Saved successfully!

Ooh no, something went wrong!