NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

root/gliderproc/trunk/MATLAB/util/isobj.m

Revision 495 (checked in by cbc, 12 years ago)

Initial import of Stark code.

Line 
1 %
2 % ISOBJ Determine if input number refers to a graphics object.
3 %
4 %       ISOBJ(X) returns 1's where the elements of X are
5 %               valid graphics object handles and 0's where they are not.
6 %
7 %       Keith Rogers 11/93
8 function boolean  = isobj(handle,currobj)
9
10 if nargin == 1,
11         currobj = 0;
12 end
13 boolean = (handle == currobj);
14 if(strcmp(get(currobj,'Type'),'axes'));
15         boolean = boolean | (handle == get(currobj,'xlabel'));
16         boolean = boolean | (handle == get(currobj,'ylabel'));
17         boolean = boolean | (handle == get(currobj,'zlabel'));
18         boolean = boolean | (handle == get(currobj,'title'));
19 end
20 children = get(currobj,'Children');
21 if(children)
22         for i = 1:length(children)
23                 boolean = boolean | isobj(handle,children(i));
24         end
25 end
Note: See TracBrowser for help on using the browser.