function [D]=SimCOTr(tr_sig_matrix)

addpath('C:\Users\TT\Desktop\this week\FinalCode_UBSS\PlusOmpDemo')

Y = tr_sig_matrix;%training singal matrix
DCT = opDCT(512);
D = opToMatrix(DCT);%init_dictionary

d = 512; %the number of atoms in training dictionary
S = 5; %the number of nonzero elements in coefficient vector
itN = 5; %the number of iterations of KSVD algorithm 30
IPara.itN = 1; %the number of iterations in dictionary update stage
IPara.gmin = 1e-3; % the minimum value of gradient 5
IPara.Lmin = 1e-4; %t4-t1 should be larger than Lmin 6
IPara.t4 = 1e-2; %the initial value of t4
IPara.rNmax = 2; %the number of iterative refinement in Part B in DictLineSearch03.m 3
IPara.dispN = 20; % the display interval
IPara.DebugFlag = 0; %the flag for debugging ill-conditioned problem
IPara.I = 1:d; %the subset of training atoms in SimCO

 for itn = 1:itN
       X = OMP(D,Y,S); %sparse coding stage
            
       if itn <= 3 %when mu is no more than 30, it is set to 0 for accurate solution
             IPara.mu = 1e-1;
       else
             IPara.mu = 0;
       end
       [D,X,OPara] = DictUpdate03 (Y, D, X, IPara);
 end     
 
 