
    %DICTIONARY UPDATE STEP
    if strcmpi(typeUpdate,'mocod')			%if update is MOCOD create parameters structure
        mocodParams = struct('zeta',DL.param.zeta,...	%coherence regularization factor
            'eta',DL.param.eta,...		%atoms norm regularization factor
            'Dprev',dico);				%previous dictionary
        % dico = dico_update(dico,sig,solver.solution,typeUpdate,flow,learningRate,mocodParams);
        if ~isfield(DL.param,'decFcn'), DL.param.decFcn = 'none'; end

        dico = dico_update_mocod(dico,sig,solver.solution,typeUpdate,flow,learningRate,mocodParams);
           
    else
        [dico, solver.solution] = dico_update(dico, sig, solver.solution, ...
            typeUpdate, flow, learningRate);
        dico = normcols(dico);
    end
    
    switch lower(DL.param.decFcn)
        case 'ink-svd'
            dico = dico_decorr_symetric(dico,mu,solver.solution);
        case 'grassmannian'
            [n m] = size(dico);
            dico = grassmannian(n,m,[],0.9,0.99,dico);
        case 'shrinkgram'
            dico = shrinkgram(dico,mu);
        case 'iterproj'
            dico = iterativeprojections(dico,mu,Problem.b1,solver.solution);
        otherwise
    end
    