Documentation of ishghandle


Global Index (short | long) | Local contents | Local Index (short | long)


Function Synopsis

isHG = ishghandle( h )

Help text

ISHGHANDLE True for Handle Graphics object handles.
   ISHGHANDLE(H) returns an array that contains 1's where the elements
   of H are valid graphic object handles and 0's where they are not.
   Differs from ISHANDLE in that Simulink objects handles return false.

Cross-Reference Information

This function calls This function is called by

Listing of function ishghandle

function isHG = ishghandle( h )

%   Copyright 1984-2000 The MathWorks, Inc. 
%   $Revision: 1.3 $  $Date: 2000/06/01 02:54:04 $

error( nargchk(1,1,nargin) )

pendingError = lasterr;
wasError = 0;

%See if it is a handle of some kind
isHG = ishandle(h);
for i = 1:length(h(:))
  if isHG(i)
    %If can not GET the Type of the object then it is not an HG object.
    dberror = disabledberror;
    try
      t = get(h(i),'type');
      isHG(i) = logical(1);
    catch
      isHG(i) = logical(0);
      wasError = 1;
    end
    enabledberror(dberror);
  end
end

%Do not change the current error that may be reported by user of this function.
if wasError
	lasterr( pendingError )
end