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: one_init3.m
    path of file: ./repos/Mathematics/mm/matlab/2018/F/code
    
    the code of the file until where you have to start completion: %%{ 
    function [Solu] = one_init3(Flight_table, Gate_table)
        %% 窄求解 N 
        FS = size(Flight_table);
        GS = size(Gate_table);
        Flight_nums = FS(1); %航班数量
        Gate_nums = GS(2);   %登机口数量
        
        Solu = zeros(Flight_nums, Gate_nums+1); % 初始化解
        
        Gate_time_net = zeros( 864*5 ,Gate_nums); % 待优化 中间变量   3天
        
        Gate_time = zeros(1, Gate_nums);% 门最后空闲时间
        
        for i = 1:Flight_nums % 为每个航班选择登机口
            
           %i        
           in_time1 = Flight_table(i, 1);       % 该航班到时间
           out_time1 = Flight_table(i, 2) + 45; % 该航班离开时间 + 45 
           gate_candidate = [];
           for j = 1:Gate_nums %遍历每一个登机口，看哪一个合适
               f1 = ((Flight_table(i,3)==0)&&((Gate_table(1,j)==1)));
               f2 = ((Flight_table(i,3)==1)&&((Gate_table(1,j)==0)));
               f3 = ((Flight_table(i,4)==0)&&((Gate_table(2,j)==1)));
               f4 = ((Flight_table(i,4)==1)&&((Gate_table(2,j)==0)));

               
               % f5 = ( Flight_table(i, 1) < Gate_time(j));
               f5 = (  sum(Gate_time_net( in_time1:out_time1-1, j)) >=1 ); % 45空间还可以用===============
       
    
function [Solu] = one_init3(Flight_table, Gate_table)
        %% 窄求解 N 
        FS = size(Flight_table);
        GS = size(Gate_table);
        Flight_nums = FS(1); %航班数量
        Gate_nums = GS(2);   %登机口数量
        
        Solu = zeros(Flight_nums, Gate_nums+1); % 初始化解
        
        Gate_time_net = zeros( 864*5 ,Gate_nums); % 待优化 中间变量   3天
        
        Gate_time = zeros(1, Gate_nums);% 门最后空闲时间
        
        for i = 1:Flight_nums % 为每个航班选择登机口
            
           %i        
           in_time1 = Flight_table(i, 1);       % 该航班到时间
           out_time1 = Flight_table(i, 2) + 45; % 该航班离开时间 + 45 
           gate_candidate = [];
           for j = 1:Gate_nums %遍历每一个登机口，看哪一个合适
               f1 = ((Flight_table(i,3)==0)&&((Gate_table(1,j)==1)));
               f2 = ((Flight_table(i,3)==1)&&((Gate_table(1,j)==0)));
               f3 = ((Flight_table(i,4)==0)&&((Gate_table(2,j)==1)));
               f4 = ((Flight_table(i,4)==1)&&((Gate_table(2,j)==0)));

               
               % f5 = ( Flight_table(i, 1) < Gate_time(j));
               f5 = (  sum(Gate_time_net( in_time1:out_time1-1, j)) >=1 ); % 45空间还可以用===============
               
               if( f1 || f2 || f3 || f4 || f5 ) %不合适
               else % 合适
                   gate_candidate = [gate_candidate; j]; % 合适的存放起来
               end