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: MRAELBP.m
    path of file: ./repos/MCITF/Code/MCITF/MRAELBP
    
    the code of the file until where you have to start completion: function [codeMap,P] = MRAELBP(grayim)
% Median Robust Adjacent Evaluation of Local Binary Pattern
% improved LBP texture feature

% code author: Guorong Song
% Email: grs59680@gmail.com
% Date: 1/4/2019


    
function [codeMap,P] = MRAELBP(grayim)
% Median Robust Adjacent Evaluation of Local Binary Pattern
% improved LBP texture feature

% code author: Guorong Song
% Email: grs59680@gmail.com
% Date: 1/4/2019

%% Radius and Neighborhood
R=2; P=16;    
%% Genearte mapping
% patternMappingriu2 = getmappingNew(P,'riu2');  % code patterns
load('./MRAELBP/R2.mat');

% if R == 1
%     load('.\\MRAELBP\\R1.mat'); 
% elseif R == 2
%     load('.\\MRAELBP\\R2.mat');
% else
%     load('.\\MRAELBP\\R3.mat');
% end