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: rand_int.m
    path of file: ./repos/bspm/thirdparty/MIALAB/GroupICATv4.0a/icatb/toolbox/mi
    
    the code of the file until where you have to start completion: function [ndraw, count, count2, error]=rand_int(a, b, n, sorted, no_duplicates, make_plot)
% % This program quickly and randomly selects n integers from a to b.

    
function [ndraw, count, count2, error]=rand_int(a, b, n, sorted, no_duplicates, make_plot)
% % This program quickly and randomly selects n integers from a to b.
% % The uniform distribution is used so that all integers are more equally
% % probable.  No claims are made about the actual probability
% % distributions.
% %
% % Input Arguments      ************************************************
% %
% % a and b are the lower and upper values of the range of integers.
% % Either a or b can be the higher and lower values of the range.
% %
% % n is the number of integers to select and can be a constant
% % or a two element vector.
% %
% % If n is a single number, then ndraw is a column vector.
% %
% % If n is a two element vector then n specifies the size of the output
% % matrix.  Example: n=[mm nn]; size(ndraw)=[mm nn];
% %
% % The user specifies whether the output is sorted 1 or randomly ordered 0.
% % The defualt is not sorted.  If sorted the output is in ascend