function printRcondWarning(rCond, classA)
% Private helper to print the correct warning text for badly conditioned
% inputs. Behavior copied from
% matlab/src/mathlinalg/include/mathlinalg/rcondwarning_util.hpp

%   Copyright 2017 The MathWorks, Inc.

if rCond == 0.0
    warning(message('MATLAB:singularMatrix'));
elseif rCond <= eps(classA)
    warning(message('MATLAB:nearlySingularMatrix', ...
        sprintf('%13.6e', full(rCond))));
elseif isnan(rCond)
    warning(message('MATLAB:illConditionedMatrix'));
end
end
