Mercurial > hg > smallbox
annotate DL/Majorization Minimization DL/ExactDicoRecovery/mmdlcn_exactRec_demo.m @ 247:ecce33192fcc tip
Added tag ver_2.1 for changeset cef4500b936f
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Wed, 31 Oct 2012 12:24:44 +0000 |
parents | b14209313ba4 |
children |
rev | line source |
---|---|
ivan@155 | 1 function mmdlcn_exactRec_demo(it,k,sn,cs) |
ivan@155 | 2 tic |
ivan@155 | 3 IT = it; |
ivan@155 | 4 K = k; |
ivan@155 | 5 SN = sn; |
ivan@155 | 6 if SN<10, |
ivan@155 | 7 samnum = ['0',num2str(SN)]; |
ivan@155 | 8 else |
ivan@155 | 9 samnum = num2str(SN); |
ivan@155 | 10 end |
ivan@155 | 11 load(['Param',num2str(K),'kS',samnum,'.mat']) |
ivan@155 | 12 lambda = 2*.2; % 2 * Smallest coefficients (Soft Thresholding) |
ivan@155 | 13 if cs == 'bn' |
ivan@155 | 14 res = 1; |
ivan@155 | 15 elseif cs == 'un' |
ivan@155 | 16 res = 2; |
ivan@155 | 17 else |
ivan@155 | 18 disp('Undefined dictionary admissible set.') |
ivan@155 | 19 end |
ivan@155 | 20 method = ['bn';'un']; |
ivan@155 | 21 res = 2; % 1 for bounded-norm, 2 for unit-norm |
ivan@155 | 22 %%%%%%%%%%%%%% |
ivan@155 | 23 Phi = Phio; |
ivan@155 | 24 M = size(Phi,1); |
ivan@155 | 25 [Phi,unhat,ert] = mmdl_cn(x,Phi,lambda,IT,res); |
ivan@155 | 26 |
ivan@155 | 27 save(['RDLl1',num2str(M),'t',num2str(IT),'iki',method(res,:),num2str(K),'v1d',num2str(SN),'.mat'],'Phi','Phid','x','ud','unhat','ert') |
ivan@155 | 28 |
ivan@155 | 29 toc |