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

% $Revision: 1.6 $  $Date: 1998/12/17 19:07:32 $
% Copyright (c) 1984-1998 by The MathWorks, Inc.


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