comparison solvers/SMALL_MP.m @ 22:524cc3fff5ac

(none)
author idamnjanovic
date Tue, 27 Apr 2010 13:32:27 +0000
parents 01cad25206d6
children 8e660fd14774
comparison
equal deleted inserted replaced
21:0211faef9add 22:524cc3fff5ac
1 function [A]=SMALL_MP(Dict,X, m, maxNumCoef, errorGoal, varargin) 1 function [A]=SMALL_MP(Dict,X, m, maxNumCoef, errorGoal, varargin)
2 %% 2 %%
3 %============================================= 3 %
4 % Centre for Digital Music, Queen Mary, University of London.
5 % This file copyright 2009 Ivan Damnjanovic.
6 %
7 % This program is free software; you can redistribute it and/or
8 % modify it under the terms of the GNU General Public License as
9 % published by the Free Software Foundation; either version 2 of the
10 % License, or (at your option) any later version. See the file
11 % COPYING included with this distribution for more information.
12 %
4 % Sparse coding of a group of signals based on a given 13 % Sparse coding of a group of signals based on a given
5 % dictionary and specified number of atoms to use. 14 % dictionary and specified number of atoms to use.
6 % input arguments: Dict - the dictionary 15 % input arguments: Dict - the dictionary
7 % X - the signals to represent 16 % X - the signals to represent
8 % m - number of atoms in Dictionary 17 % m - number of atoms in Dictionary
10 % each signal. 19 % each signal.
11 % 20 %
12 % optional: if Dict is function handle then Transpose Dictionary 21 % optional: if Dict is function handle then Transpose Dictionary
13 % handle needs to be specified. 22 % handle needs to be specified.
14 % 23 %
15 % based on KSVD toolbox solver found on Miki Elad webpage (finding inverse 24
16 % with pinv() is changed with matching pursuit)
17 % Ivan Damnjanovic 2009
18 %=============================================
19 %%
20 %% 25 %%
21 % This Dictionary check is based on Thomas Blumensath work in sparsify 0_4 greedy solvers 26 % This Dictionary check is based on Thomas Blumensath work in sparsify 0_4 greedy solvers
22 explicitD=0; 27 explicitD=0;
23 if isa(Dict,'float') 28 if isa(Dict,'float')
24 D =@(z) Dict*z; 29 D =@(z) Dict*z;