function str = code2str(exitflag)
%

%   Copyright 2017 The MathWorks, Inc.

switch exitflag
    case 0
        str = getString(message('stats:clustering:ldautils:code2str:MaxIterReached'));
    case 1
        str = getString(message('stats:clustering:ldautils:code2str:LogLikToleranceMet'));
%     case 2
%         str = "Tensor decomposition performed";
    otherwise
        str = getString(message('stats:clustering:ldautils:code2str:BadStatus'));
end

str = string(str);
end
