view DL/Majorization Minimization DL/ExactDicoRecovery/mod_exactRec.m @ 186:9c418bea7f6a bug_386

Addresses Bug #386: removed the 4th output variable (versn) in all calls of function fileparts.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Thu, 09 Feb 2012 17:25:14 +0000
parents b14209313ba4
children
line wrap: on
line source
%%% MOD (||ki||<=1) %%%%
function mod_exactRec(it,k,sn)
tic
IT = str2num(it);
K = str2num(k);
SN = str2num(sn);
if SN<10,
    samnum = ['0',num2str(SN)];
else
    samnum = num2str(SN);
end
load(['Param',num2str(K),'kS',samnum,'.mat'])
method = ['bn';'un'];
res = 2; % 1 for bounded-norm, 2 for unit-norm
lambda = 2*.2; % 2 * Smallest coefficients (Soft Thresholding)
% lambda = 2*.2^2; % 2 * Smallest coefficients (Hard Thresholding)
%%%%%%%%%%%%%%
Phi = Phio;
[PhiN,PhiM] = size(Phi);
RR1 = PhiM;
%%%%%%%%%%%%%%
[PhiM,L] = size(ud);
unhat = ones(PhiM,L);
for it = 1:IT
    it
    to = .1+svds(Phi,1);
    [PhiN,PhiM] = size(Phi);
    %%%%
%     eps = 10^-7;
    eps = 3*10^-4;
    maxIT = 1000;
    map = 0;
    [unhat,l1err] = mm1(Phi,x,unhat,to,lambda,maxIT,eps,map); %% Sparse approximation with Iterative Soft-thresholding
    ert(it) = l1err;
    %%%   
    [Phi,unhat] = modcn(x,unhat,res);
end
save(['MODl120t',num2str(IT),'iki',method(res,:),num2str(K),'v2d',num2str(SN),'.mat'],'Phi','Phid','x','ud','unhat','ert')
toc