function pause2(n)
% PAUSE2   Temporarily stops a procedure for a specified
%          length of time.
%          (See PAUSE in MATLAB Toolbox)
%
%          PAUSE2(N)
%            N - number of seconds (may be fractional).
%          Stops procedure for N seconds.
%
%          NOTE: PAUSE2 differs from PAUSE in that pauses may
%            take a fractional number of seconds. PAUSE(1.2) will
%            halt a procedure for 1 second. PAUSE2(1.2) will halt
%            a procedure for 1.2 seconds.

%         M.H. Beale & H.B. Demuth, 1-31-92
%         Copyright (c) 1992-93 by the MathWorks, Inc.

if nargin ~= 1
  error('Wrong number of input arguments.');
  end

drawnow
t1 = clock;
while etime(clock,t1) < n
  end
