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: GNGUpdate.m
    path of file: ./repos/PlatEMO/PlatEMO/Algorithms/Multi-objective optimization/DEA-GNG
    
    the code of the file until where you have to start completion: function net = GNGUpdate(oSignals,net)
% Update GNG

%--------------------------------------------------------------------------
% Copyright Yiping Liu
% Please contact {yiping0liu@gmail.com} if you have any problem.
%--------------------------------------------------------------------------
    
    %% Parameters 
    [nSig,D]=size(oSignals);
    maxAge = net.maxAge; 
    lambda = net.lambda;   
    epsilon_a = net.epsilon_a;    
    epsilon_nb = net.epsilon_nb;   
    alpha = net.alpha;           
    delta = net.delta;           
    maxHP = net.maxHP;
    maxIter = net.maxIter;
    Node = net.Node;
    Err  = net.Err;   
    edge = net.edge;  
    age  = net.age;      
    hp  = net.hp;

    
function net = GNGUpdate(oSignals,net)
% Update GNG

%--------------------------------------------------------------------------
% Copyright Yiping Liu
% Please contact {yiping0liu@gmail.com} if you have any problem.
%--------------------------------------------------------------------------
    
    %% Parameters 
    [nSig,D]=size(oSignals);
    maxAge = net.maxAge; 
    lambda = net.lambda;   
    epsilon_a = net.epsilon_a;    
    epsilon_nb = net.epsilon_nb;   
    alpha = net.alpha;           
    delta = net.delta;           
    maxHP = net.maxHP;
    maxIter = net.maxIter;
    Node = net.Node;
    Err  = net.Err;   
    edge = net.edge;  
    age  = net.age;      
    hp  = net.hp;

    
    %% Randamize Input Signal
    ran = randperm(nSig);
    oSignals = oSignals(ran,:);   
   
    %% Input Signal Normalization [0-1]
    oMax = max(oSignals,[],1);
    oMin = min(oSignals,[],1);
    oRange = oMax-oMin;
    Signals = (oSignals - repmat(oMin,nSig,1))./repmat(oRange,nSig,1);

    %% Update GNG   
    for nitr = 1:maxIter      
        % Step 0: Initialization. Start with two neural units (nodes) selected from input data
        if size(Node,1) <= 2
            Ni = 2;
            Xmin = min(Signals,[],1);
            Xmax = max(Signals,[],1);
            for i = 1:Ni
                Node(i,:) = unifrnd(Xmin, Xmax);
            end