You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: evalcon.m
    path of file: ./repos/prima/benchmark/rescue_idz/matlab/interfaces/private
    
    the code of the file until where you have to start completion: function [cineq, ceq, succ] = evalcon(invoker, nonlcon, x, constrmax)
%EVALCON evaluates a constraint function `[cineq, ceq] = nonlcon(x)`.
% In particular, it uses a '
    
function returns cineq =\n%s\nAny value that is not real or above constrmax = %g is replaced by constrmax.\nThe value of x is:\n%s\n', invoker, cstr, constrmax, xstr);
    warning(wid, '%s', wmsg);
    %warnings = [warnings, wmsg];  % We do not record this warning in the output.

    % Apply the moderated extreme barrier:
    cineq(~isreal(cineq) | cineq~= cineq | cineq > constrmax) = constrmax;
end

if any(isnan(ceq) | ~isreal(ceq) | abs(ceq) > constrmax)
    wid = sprintf('%s:ConstraintAbnormalReturn', invoker);
    xstr = sprintf('%g    ', x);
    if any(~isreal(ceq))
        cstr = sprintf('%g%+gi    ', [real(ceq(:)), imag(ceq(:))].');
    else
        cstr = sprintf('%g    ', ceq);
    end