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: convertYmn2FBC2.m
    path of file: ./repos/yeast-GEM/code/.deprecated/otherChanges
    
    the code of the file until where you have to start completion: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% convertYmn2FBC2
% The main purpose of this script is to convert yeast metabolic network 7.6
% from COBRA-compatible SBML2 to FBC v2 thereby adding the missing
% annotation data, which could not be retained with the older COBRA
% versions. The 
    
function
model_sbml2.metCHEBIID=model_sbml3.metCHEBIID;
model_sbml2.metKEGGID=model_sbml3.metKEGGID;
model_sbml2.metPubChemID=model_sbml3.metPubChemID;
model_sbml2.metInChIString=model_sbml3.metInChIString;

% We no longer need model_sbml3;
clear model_sbml3

% The following information was not imported by readCbModel:
%   model.metCharge. We will import it.
%   KEGG reaction ids. There is no designated variable in model structure
%   for it, so we cannot carry it.
%   model.rxnReferences. When having multiple references for one reaction,
%   separated by semicolon in FBC v2, only the first reference is imported,
%   when using readCbModel. So it is better for now to leave it empty
%   rather than having it incomplete.

% As for metCharge, we need to open SBML3 model with TranslateSBML function
% and to manually obtain this data. modelSBML.species contains metabolites
% and genes, so we will need to map modelSBML.species to model_sbml2.mets
modelSBML=TranslateSBML('yeast_7.6.xml');
metCharge=cell(numel(model_sbml2.mets),1);
for i=1:numel(model_sbml2.mets)
    for j=1:numel(modelSBML.species)
        if strcmp(model_sbml2.mets(i),modelSBML.species(j).id)
            metCharge{i}=regexprep(modelSBML.species(j).notes,'.+<p>CHARGE:','');
            metCharge{i}=regexprep(metCharge{i},'</p>.+','');
            metCharge{i}=regexprep(metCharge{i},'+','');
        end