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: rejection.m
    path of file: ./repos/Point_cloud_tools_for_Matlab/classes/@corrPoints
    
    the code of the file until where you have to start completion: function obj = rejection(obj, mode, varargin)

% Input parsing ----------------------------------------------------------------


    
function obj = rejection(obj, mode, varargin)

% Input parsing ----------------------------------------------------------------

validMode = {'Attribute' 'dAlphaNaN'};

p = inputParser;
p.addRequired( 'mode'                , @(x) any(strcmpi(x, validMode)));
p.addParameter('AttributeName'  , '' , @ischar);          % for mode 'Attribute'
p.addParameter('AttributeMinMax', [] , @(x) numel(x)==2); % for mode 'Attribute'
p.parse(mode, varargin{:});
p = p.Results;
% Clear required inputs to avoid confusion
clear mode

% Start ------------------------------------------------------------------------

procHierarchy = {'CORRPOINTS' 'REJECTION'};
msg('S', procHierarchy);
msg('I', procHierarchy, sprintf('Corr. points label = ''%s''', obj.label));
msg('I', procHierarchy, sprintf('IN: Mode = ''%s''', p.mode));
if strcmpi(p.mode, 'Attribute')
    msg('I', procHierarchy, sprintf('IN: AttributeName = ''%s''', p.AttributeName));
    msg('V', p.AttributeMinMax(1), 'IN: AttributeMinMax(1)', 'Prec', 3);
    msg('V', p.AttributeMinMax(2), 'IN: AttributeMinMax(2)', 'Prec', 3); 
end