Mercurial > hg > smallbox
comparison solvers/SMALL_MP.m @ 128:8e660fd14774 ivand_dev
Feature 186
author | Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk> |
---|---|
date | Mon, 13 Jun 2011 14:55:45 +0100 |
parents | 524cc3fff5ac |
children |
comparison
equal
deleted
inserted
replaced
126:db5a7fe1a404 | 128:8e660fd14774 |
---|---|
1 function [A]=SMALL_MP(Dict,X, m, maxNumCoef, errorGoal, varargin) | 1 function [A]=SMALL_MP(Dict,X, m, maxNumCoef, errorGoal, varargin) |
2 %% | 2 %% Implementation of Matching Pursuit algorithm |
3 % Sparse coding of a group of signals based on a given | |
4 % dictionary and specified number of atoms to use. | |
5 % input arguments: Dict - the dictionary | |
6 % X - the signals to represent | |
7 % m - number of atoms in Dictionary | |
8 % errorGoal - the maximal allowed representation error for | |
9 % each signal. | |
10 % | |
11 % optional: if Dict is function handle then Transpose Dictionary | |
12 % handle needs to be specified. | |
13 % | |
14 | |
3 % | 15 % |
4 % Centre for Digital Music, Queen Mary, University of London. | 16 % Centre for Digital Music, Queen Mary, University of London. |
5 % This file copyright 2009 Ivan Damnjanovic. | 17 % This file copyright 2009 Ivan Damnjanovic. |
6 % | 18 % |
7 % This program is free software; you can redistribute it and/or | 19 % This program is free software; you can redistribute it and/or |
8 % modify it under the terms of the GNU General Public License as | 20 % modify it under the terms of the GNU General Public License as |
9 % published by the Free Software Foundation; either version 2 of the | 21 % published by the Free Software Foundation; either version 2 of the |
10 % License, or (at your option) any later version. See the file | 22 % License, or (at your option) any later version. See the file |
11 % COPYING included with this distribution for more information. | 23 % COPYING included with this distribution for more information. |
12 % | 24 % |
13 % Sparse coding of a group of signals based on a given | |
14 % dictionary and specified number of atoms to use. | |
15 % input arguments: Dict - the dictionary | |
16 % X - the signals to represent | |
17 % m - number of atoms in Dictionary | |
18 % errorGoal - the maximal allowed representation error for | |
19 % each signal. | |
20 % | |
21 % optional: if Dict is function handle then Transpose Dictionary | |
22 % handle needs to be specified. | |
23 % | |
24 | |
25 %% | 25 %% |
26 % 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 |
27 explicitD=0; | 27 explicitD=0; |
28 if isa(Dict,'float') | 28 if isa(Dict,'float') |
29 D =@(z) Dict*z; | 29 D =@(z) Dict*z; |