function x = realsqrt(x)
%MATLAB Code Generation Library Function

%   Copyright 2006-2014 The MathWorks, Inc.
%#codegen

eml_invariant(nargin > 0,'MATLAB:minrhs');
eml_invariant(isfloat(x),'Coder:toolbox:unsupportedClass',mfilename,class(x));
eml_invariant(isreal(x),'Coder:toolbox:realsqrt_3');
% Error if any x(k) < 0
if coder.internal.isDomainError(x,@lt,zeros('like',x))
    coder.internal.error('MATLAB:realsqrt:complexResult');
end
x = coder.internal.applyScalarFunctionInPlace(mfilename,@coder.internal.scalar.realsqrt,x);
