function ts = binaryts(a,b)
% Adds output of UTARBTS as valid sample time, which
% matches any of 0, >0 or -1.

% Copyright 2003-2004 The MathWorks, Inc.

m = utarbts;
if isequal(a,m)
   ts = b;
elseif isequal(b,m)
   ts = a;
elseif a==b
   ts = a;
elseif (a>0 & b==-1) | (b>0 & a==-1)
   ts = abs(a*b);
else
   error('Incompatible Sample Times');
end
%if a==b
%   ts = a;
%elseif (a>0 & b==-1) | (b>0 & a==-1)
%   ts = abs(a*b);
%else
%   error('Incompatible Sample Times');
%end
