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: xASL_im_ProcessM0Conventional.m
    path of file: ./repos/ExploreASL/Functions/ImageProcessing
    
    the code of the file until where you have to start completion: function [Corr_M0] = xASL_im_ProcessM0Conventional(ImIn, x)
%xASL_im_M0ConventionalProcessing This function uses the conventional M0 masking,
% and only a little smoothing, following what Philips uses for its 3D
% GRASE. Advantages of the newer M0 processing in ExploreASL are the lack
% of use of M0 threshold-based masking, the removal of high CSF values and
% higher SNR for ASL division.
%
% FORMAT:       [Corr_M0] = xASL_im_ProcessM0Conventional(ImIn, x)
% 
% INPUT:        ...
%
% OUTPUT:       ...
% 
% -----------------------------------------------------------------------------------------------------------------------------------------------------
% DESCRIPTION:  This function uses the conventional M0 masking,
%               and only a little smoothing, following what Philips uses for its 3D
%               {{GRASE}}. Advantages of the newer M0 processing in ExploreASL are the lack
%               of use of {{M0}} threshold-based masking, the removal of high CSF values and
%               higher {{SNR}} for {{ASL}} division.

    
function [Corr_M0] = xASL_im_ProcessM0Conventional(ImIn, x)
%xASL_im_M0ConventionalProcessing This function uses the conventional M0 masking,
% and only a little smoothing, following what Philips uses for its 3D
% GRASE. Advantages of the newer M0 processing in ExploreASL are the lack
% of use of M0 threshold-based masking, the removal of high CSF values and
% higher SNR for ASL division.
%
% FORMAT:       [Corr_M0] = xASL_im_ProcessM0Conventional(ImIn, x)
% 
% INPUT:        ...
%
% OUTPUT:       ...
% 
% -----------------------------------------------------------------------------------------------------------------------------------------------------
% DESCRIPTION:  This function uses the conventional M0 masking,
%               and only a little smoothing, following what Philips uses for its 3D
%               {{GRASE}}. Advantages of the newer M0 processing in ExploreASL are the lack
%               of use of {{M0}} threshold-based masking, the removal of high CSF values and
%               higher {{SNR}} for {{ASL}} division.
%
% -----------------------------------------------------------------------------------------------------------------------------------------------------
% EXAMPLE:      ...
% __________________________________
% Copyright 2015-2020 ExploreASL



    %% Mask data below threshold
    LowCutOff                       = 0.2;
    HiCutOff                        = 0.6;

    Data_array                      = sort(ImIn(:));
    % 
    Data_array(Data_array<(LowCutOff.*max(Data_array)))    = [];
    Data_array(Data_array>(HiCutOff.*max(Data_array)))    = [];
    % 
    % [N X]=hist(MaskM0)
    % figure(2);plot(X,N)

    Diff_array                      = Data_array(2:end