function a = realsqrt(b)
%REALSQRT Real square root.
%   REALSQRT(X) requires X to have real, nonnegative elements.
%
%   See also REALLOG, REALPOW.

% $Revision: 1.7 $  $Date: 2000/06/19 16:57:07 $
% Copyright 1984-2000 The MathWorks, Inc.


a = sqrt(b);
if( any(any(imag(a))) ),
   error( 'Realsqrt produces complex result.' );
end
