function out = isequal(obj1, obj2)
%ISEQUAL True if instrument object arrays are equal.
%
%    ISEQUAL(A,B) is 1 if the two instrument object arrays are the same
%    size and are equal, and 0 otherwise.
% 

%    MP 9-15-99
%    Copyright 1999-2000 The MathWorks, Inc. 
%    $Revision: 1.3 $  $Date: 2000/07/19 12:46:58 $

% Return 0 if either input arguments are empty.
if isempty(obj1)
    out = logical(0);
    return;
elseif isempty(obj2)
    out = logical(0);
    return;
end

% Inputs must be the same size.
if ~all((size(obj1) == size(obj2)))
    out = logical(0);
    return;
end

% Call @instrument\eq.
out = eq(obj1, obj2);

% Return just a 1 or 0.  
% Ex. isequal(obj, obj)  where obj = [s s s]
% eq returns [1 1 1] isequal returns 1.
out = all(out);