MATLAB POLYSPACE RELEASE NOTES Bedienungsanleitung Seite 138

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 240
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 137
3 Graphics
are more than one. The following four sections provide examples illustrating
how to use
findobj.
Finding All Objects of a Certain Type
Because all objects have a Type property that identifies the type of object,
you can find the handles of all occurrences of a particular type of object. For
example,
h = findobj('Type','p atch');
finds the handles of all patch objects.
Finding Objects with a Particular Property
You can specify multiple properties to narrow the search. For example,
h = findobj('Type','l ine','Color','r','Li neStyle',':');
finds the handles of all red dotted lines.
Limiting the Scope of the Search
You can specify the starting point in the object hierarchy by passing the
handle of the starting figure or axes as the first argument. For example,
h = findobj(gca,'Type ','text','String','\ pi/2');
finds the string π/2 only within the current axes.
Using findobj as an Argument
Because findobj returns the handles it finds, you can use it in place of the
handle argument. For example,
set(findobj('Type','line','Color' ,'red'),'LineStyle', ':')
finds all re d l ines and sets t h e i r line style to dotted .
3-82
Seitenansicht 137
1 2 ... 133 134 135 136 137 138 139 140 141 142 143 ... 239 240

Kommentare zu diesen Handbüchern

Keine Kommentare