function val = ne(a,b)
%HANDLE/NE

%   Copyright 1984-2000 The MathWorks, Inc. 
%   $Revision: 1.9 $  $Date: 2000/06/01 02:52:54 $
%   J.H. Roh & B.A. Jones 4-25-97.

S.type = '.';
S.subs = 'HGHandle';

if iscell(a) | length(a)>1
   aH = subsref(a,S);
   aH = [aH{:}];
elseif ~isempty(a)
   if isa(a,'scribehandle')
      aH = a.HGHandle;
   else
      aH = a;
   end
else
   aH = [];
end
if iscell(b) | length(b)>1
   bH = subsref(b,S);
   bH = [bH{:}];
elseif ~isempty(b)
   if isa(b,'scribehandle')
      bH = b.HGHandle;
   else
      bH = b;
   end
else
   bH = [];
end

val = aH ~= bH;

