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: CBIG_ComputeLocalDegree.m
    path of file: ./repos/CBIG/utilities/matlab/FC
    
    the code of the file until where you have to start completion: function CBIG_ComputeLocalDegree(input_file, output_file, neighbors_file, threshold)

% CBIG_ComputeLocalDegree(input_file, output_file, neighbors_file, threshold)
% This function is used to compute the local degree with threshold for each
% vertex.

    
function CBIG_ComputeLocalDegree(input_file, output_file, neighbors_file, threshold)

% CBIG_ComputeLocalDegree(input_file, output_file, neighbors_file, threshold)
% This function is used to compute the local degree with threshold for each
% vertex.
% Input:
%      -input_file:
%       Can be either a .mat file or a .nii/nii.gz file contains fMRI data.
%      -output_file:
%       output .mat file
%      -neighbors_file:
%       a .mat file contains neighborhood_cell, which is a Nx1 cell, each
%       row corresponds to the indices of neighborhood vertices.
%      -threshold:
%       threshold used to compute degree 
%
% Written by CBIG under MIT license: https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md


load(neighbors_file, 'neighborhood_cell');
if(strfind(input_file, '.mat'))
   load(input_file, 'fmri'); 
else
   x = MRIread(input_file);
   fmri = reshape(x.vol, length(neighborhood_cell), size(x.vol, 4));
   fmri = fmri';
end