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: Search_BIC.m
    path of file: ./repos/gift/GroupICAT/icatb/toolbox/nbic
    
    the code of the file until where you have to start completion: function Bic = Search_BIC(CMP_idx,components,simC,simS,start)

% Search biclusters by building different subsets of components
% It uses a modified depth-first-search (DFS) technique to create all possible subset of a given set
% And, traverse through the branches
% Use early abondoning the brances based on the imposed threshold
% The thresholds are usedefined
% User can control the size of the biclusters. Seperate for each dimension. Also, the ovrlap between them    
% Input:
% CMP_idx = An array of variables. It takes the Ids and the array seperately. 
% So that we can run the tweaks on the set of variables.   
% Ids: For example [1 3 5 8 9 6] 
% components = The cell array of instancs for a variable (sets).
% where each set is a group/vector of instances for a given variable
% simC = set of instances (for variable 1) in a BIC
% simS = set of instances (for variable 2) in a BIC
% start = A tracker of the component that being used to create the subset 
% by munna Dated: 4/Aug/2017

%% Write bicluster
 
global BicList;
global BicId;
global minSub;
global minCmp;
if(length(simS)>=minSub && length(simC)>=minCmp)    
if(BicId == 1) % Checking for first cluster
BicList(BicId).subs = simS;
BicList(BicId).comps = simC;
BicList(BicId).freq = 1;
%fprintf("biCluster# %u is done\n",BicId);      

    
function Bic = Search_BIC(CMP_idx,components,simC,simS,start)

% Search biclusters by building different subsets of components
% It uses a modified depth-first-search (DFS) technique to create all possible subset of a given set
% And, traverse through the branches
% Use early abondoning the brances based on the imposed threshold
% The thresholds are usedefined
% User can control the size of the biclusters. Seperate for each dimension. Also, the ovrlap between them    
% Input:
% CMP_idx = An array of variables. It takes the Ids and the array seperately. 
% So that we can run the tweaks on the set of variables.   
% Ids: For example [1 3 5 8 9 6] 
% components = The cell array of instancs for a variable (sets).
% where each set is a group/vector of instances for a given variable
% simC = set of instances (for variable 1) in a BIC
% simS = set of instances (for variable 2) in a BIC
% start = A tracker of the component that being used to create the subset 
% by munna Dated: 4/Aug/2017

%% Write bicluster
 
global BicList;
global BicId;
global minSub;
global minCmp;
if(length(simS)>=minSub && length(simC)>=minCmp)    
if(BicId == 1) % Checking for first cluster
BicList(BicId).subs = simS;
BicList(BicId).comps = simC;
BicList(BicId).freq = 1;
%fprintf("biCluster# %u is done\n",BicId);      
BicId = BicId+1;
else
    %v = BIC_validation(simS,simC); 
    v = BIC_validation(simS,simC); % A different strategy for validation 
    if(v == 1)
     %fprintf("Adding biCluster# %u to the list....\n",BicId);      
     BicList(BicId).subs = simS;
     BicList(BicId).comps = simC;
     BicList(BicId).freq = 1;
     BicId = BicId+1;
    end