comparison util/classes/dictionaryMatrices/iterativeprojections.m @ 184:8fc38e8df8c6 danieleb

Minor edits
author Daniele Barchiesi <daniele.barchiesi@eecs.qmul.ac.uk>
date Fri, 27 Jan 2012 13:18:50 +0000
parents 68fb71aa5339
children
comparison
equal deleted inserted replaced
183:0d7a81655ef2 184:8fc38e8df8c6
30 srs(iIter) = SNR(dic); 30 srs(iIter) = SNR(dic);
31 31
32 % calculate gram matrix 32 % calculate gram matrix
33 G = dic'*dic; 33 G = dic'*dic;
34 34
35 % project into the structural constraint set 35 % project onto the structural constraint set
36 H = zeros(size(G)); %initialise matrix 36 H = zeros(size(G)); %initialise matrix
37 ind1 = find(abs(G(:))<=mu); %find elements smaller than mu 37 ind1 = find(abs(G(:))<=mu); %find elements smaller than mu
38 ind2 = find(abs(G(:))>mu); %find elements bigger than mu 38 ind2 = find(abs(G(:))>mu); %find elements bigger than mu
39 H(ind1) = G(ind1); %copy elements belonging to ind1 39 H(ind1) = G(ind1); %copy elements belonging to ind1
40 H(ind2) = mu*sign(G(ind2)); %threshold elements belonging to ind2 40 H(ind2) = mu*sign(G(ind2)); %threshold elements belonging to ind2