function is=ischildren(children, parent) % ISCHILDREN Check if an object exists % % IS=ISCHILDREN(CHILDREN, PARENT) % % If children exists in parent return 1. % If not return 0. % % Claudio 8 Apr, 1995 % modified by Mark 31 Aug, 1995 to take into account the case where % CHILDREN is empty. % % % Copyright (c) 1995 by Claudio Rivetti and Mark Young % claudio@alice.uoregon.edu, mark@alice.uoregon.edu % if nargin>2 error('Too many input arguments.'); end if nargin<2 error('Too few input arguments.'); end child=get(parent, 'children'); if isempty(child) | isempty(children) | isempty(find(child==children)) is=0; else is=1; end return