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: vplstat.m
    path of file: ./repos/nav_matlab/example/gps_spp_test/easysuite
    
    the code of the file until where you have to start completion: function vplstat(VPL,VPE,VAL1,VAL2,src_name)
%   VPE(Nx1) = upping error 
%   VPL(1xN) = VPL from integrity system (RAIM, SBAS, etc.)
%   VAL1 = Vertical alert limit 1
%   VAL2 = Vertical alert limit 2
%   src_name = label of vertical axis which will go as subscript after 'VPL' 
%
%*     Copyright c 1998 The board of trustees of the Leland Stanford     *
%*                      Junior University. All rights reserved.          *
%*     This script file may be distributed and used freely, provided     *
%*     this copyright notice is always kept with it.                     *
%*                                                                       *
%*     Questions and comments should be directed to Todd Walter at:      *
%*     walter@relgyro.stanford.edu                                       *
%   VPLSTAT
%   VPLSTAT(FNAME, PATH, VAL1, VAL2) reads the given file of TMS Vertical 
%   Protection Limit statistics and plots the color coded histogram.  
%   In addition the regions of integrity failures and unavailability
%   are shown.  Multiple files can be combined by putting in vector of
%   strings for the FNAME (e. g. vplstat(['0421'; '0121'; '1621'])).
%   The optionalPATH is also a string and may also be in vector form 
%   (e. g. vplstat('0421',['.///////'; '../0624/']) strings must be
%   the same length). Default is './'.
%   The optional VAL1 and VAL2 arguments are given in meters (defaults
%   are 12m and 20m respectively).
%   See also : TMSSTAT, TRSNAMES, VERTSTAT, HPLSTAT
%   Example code for generating the file is included at the bottom of vplstat.m
%
%   NOTE: To plot on a non-color printer type:
% colormap('gray')
% % new colormap for colorbar (HPL and HPE plot)
 color_bar =[    
     0.6980    0.6980    0.6980;
     0.6905    0.6905    0.6905;
     0.6830    0.6830    0.6830;
     0.6754    0.6754    0.6754;
     0.6679    0.6679    0.6679;
     0.6604    0.6604    0.6604;
     0.6528    0.6528    0.6528;
     0.6453    0.6453    0.6453;
     0.6378    0.6378    0.6378;
     0.6302    0.6302    0.6302;
     0.6227    0.6227    0.6227;
     0.6152    0.6152    0.6152;
     0.6076    0.6076    0.6076;
     0.6001    0.6001    0.6001;
     0.5926    0.5926    0.5926;
     0.5850    0.5850    0.5850;
     0.5775    0.5775    0.5775;
     0.5700    0.5700    0.5700;
     0.5624    0.5624    0.5624;
     0.5549    0.5549    0.5549;
     0.5474    0.5474    0.5474;
     0.5398    0.5398    0.5398;
     0.5323    0.5323    0.5323;
     0.5247    0.5247    0.5247;
     0.5172    0.5172    0.5172;
     0.5097    0.5097    0.5097;
     0.5021    0.5021    0.5021;
     0.4946    0.4946    0.4946;
     0.4871    0.4871    0.4871;
     0.4795    0.4795    0.4795;
     0.4720    0.4720    0.4720;
     0.4645    0.4645    0.4645;
     0.4569    0.4569    0.4569;
     0.4494    0.4494    0.4494;
     0.4419    0.4419    0.4419;
     0.4343    0.4343    0.4343;
     0.4268    0.4268    0.4268;
     0.4193    0.4193    0.4193;
     0.4117    0.4117    0.4117;
     0.4042    0.4042    0.4042;
     0.3967    0.3967    0.3967;
     0.3891    0.3891    0.3891;
     0.3816    0.3816    0.3816;
     0.3741    0.3741    0.3741;
     0.3665    0.3665    0.3665;
     0.3590    0.3590    0.3590;
     0.3515    0.3515    0.3515;
     0.3439    0.3439    0.3439;
     0.3364    0.3364    0.3364;
     0.3289    0.3289    0.3289;
     0.3213    0.3213    0.3213;
     0.2966    0.2966    0.2966;
     0.2719    0.2719    0.2719;
     0.2472    0.2472    0.2472;
     0.2225    0.2225    0.2225;
     0.1977    0.1977    0.1977;
     0.1730    0.1730    0.1730;
     0.1483    0.1483    0.1483;

    
function vplstat(VPL,VPE,VAL1,VAL2,src_name)
%   VPE(Nx1) = upping error 
%   VPL(1xN) = VPL from integrity system (RAIM, SBAS, etc.)
%   VAL1 = Vertical alert limit 1
%   VAL2 = Vertical alert limit 2
%   src_name = label of vertical axis which will go as subscript after 'VPL' 
%
%*     Copyright c 1998 The board of trustees of the Leland Stanford     *
%*                      Junior University. All rights reserved.          *
%*     This script file may be distributed and used freely, provided     *
%*     this copyright notice is always kept with it.                     *
%*                                                                       *
%*     Questions and comments should be directed to Todd Walter at:      *
%*     walter@relgyro.stanford.edu                                       *
%   VPLSTAT
%   VPLSTAT(FNAME, PATH, VAL1, VAL2) reads the given file of TMS Vertical 
%   Protection Limit statistics and plots the color coded histogram.  
%   In addition the regions of integrity failures and unavailability
%   are shown.  Multiple files can be combined by putting in vector of
%   strings for the FNAME (e. g. vplstat(['0421'; '0121'; '1621'])).
%   The optionalPATH is also a string and may also be in vector form 
%   (e. g. vplstat('0421',['.///////'; '../0624/']) strings must be
%   the same length). Default is './'.
%   The optional VAL1 and VAL2 arguments are given in meters (defaults
%   are 12m and 20m respectively).
%   See also : TMSSTAT, TRSNAMES, VERTSTAT, HPLSTAT
%   Example code for generating the file is included at the bottom of vplstat.m
%
%   NOTE: To plot on a non-color printer type:
% colormap('gray')
% % new colormap for colorbar (HPL and HPE plot)
 color_bar =[    
     0.6980    0.6980    0.6980;
     0.6905    0.6905    0.6905;
     0.6830    0.6830    0.6830;
     0.6754    0.6754    0.6754;
     0.6679    0.6679    0.6679;
     0.6604    0.6604    0.6604;
     0.6528    0.6528    0.6528;
     0.6453    0.6453    0.6453;
     0.6378    0.6378    0.6378;
     0.6302    0.6302    0.6302;
     0.6227    0.6227    0.6227;
     0.6152    0.6152    0.6152;
     0.6076    0.6076    0.6076;
     0.6001    0.6001    0.6001;
     0.5926    0.5926    0.5926;
     0.5850    0.5850    0.5850;
     0.5775    0.5775    0.5775;
     0.5700    0.5700    0.5700;
     0.5624    0.5624    0.5624;
     0.5549    0.5549    0.5549;
     0.5474    0.5474    0.5474;
     0.5398    0.5398    0.5398;
     0.5323    0.5323    0.5323;
     0.5247    0.5247    0.5247;
     0.5172    0.5172    0.5172;
     0.5097    0.5097    0.5097;
     0.5021    0.5021    0.5021;
     0.4946    0.4946    0.4946;
     0.4871    0.4871    0.4871;
     0.4795    0.4795    0.4795;
     0.4720    0.4720    0.4720;
     0.4645    0.4645    0.4645;
     0.4569    0.4569    0.4569;
     0.4494    0.4494    0.4494;
     0.4419    0.4419    0.4419;
     0.4343    0.4343    0.4343;
     0.4268    0.4268    0.4268;
     0.4193    0.4193    0.4193;
     0.4117    0.4117    0.4117;
     0.4042    0.4042    0.4042;
     0.3967    0.3967    0.3967;
     0.3891    0.3891    0.3891;
     0.3816    0.3816    0.3816;
     0.3741    0.3741    0.3741;
     0.3665    0.3665    0.3665;
     0.3590    0.3590    0.3590;
     0.3515    0.3515    0.3515;
     0.3439    0.3439    0.3439;
     0.3364    0.3364    0.3364;
     0.3289    0.3289    0.3289;
     0.3213    0.3213    0.3213;
     0.2966    0.2966    0.2966;
     0.2719    0.2719    0.2719;
     0.2472    0.2472    0.2472;
     0.2225    0.2225    0.2225;
     0.1977    0.1977    0.1977;
     0.1730    0.1730    0.1730;
     0.1483    0.1483    0.1483;
     0.1236    0.1236    0.1236;
     0.0989    0.0989    0.0989;
     0.0742    0.0742    0.0742;
     0.0494    0.0494    0.0494;
     0.0247    0.0247    0.0247;
          0         0         0];
 colormap(color_bar)

% other colors used in the plot
%color1 = [134/255 134/255 134/255];  % - dark gray
 color1 = [1 0.1 0.1];              % - red (original) 

%color2 = [174/255 174/255 174/255];  % - middle gray
color2 = [1 0.55 0.55];             % - pink (original)

%color3 = [222/255 222/255 222/255];  % - light gray
color3 = [1 1 0.5];                 % - yellow (original)

%color4 = color2;                     % - middle gray
color4 = [1 .55 0.3];               % - orange (original)

set(0,'DefaultTextFontName','Times');
set(0,'DefaultAxesFontName','Times');
set(0,'DefaultTextFontSize',18);
set(0,'DefaultAxesFontSize',18);

if nargin < 2
    error('Must input VPL and VPE!');
end
if nargin < 3
    VAL1 = 12;
end
if nargin < 4
    VAL2 = 20;
end

% size of VPL, which should be the same for VPE as well
n = size(VPL,2);

% VPE
j = floor(4.0*abs(VPE))+1;
j(find(j>=100)) = 100;
% VPL
k = floor(4.0*abs(VPL))+1;
k(find(k>=100)) = 100;

% initialize vpl_stat
data     = zeros(100,100);
diagonal = zeros(100,1);
for i = 1:n
    % statistics
    data(k(i),j(i)) = data(k(i),j(i))+1;
    % diagonal
    if((k(i) == j(i)) && (abs(VPE(i,1)) < abs(VPL(1,i))))
        diagonal(k(i),1) = diagonal(k(i),1)+1;
    end