diff util/SMALL_init_solver.m @ 140:31d2864dfdd4 ivand_dev

Audio Impainting additional constraints with cvx added
author Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk>
date Mon, 25 Jul 2011 17:27:05 +0100
parents 8e660fd14774
children
line wrap: on
line diff
--- a/util/SMALL_init_solver.m	Thu Jul 21 16:37:14 2011 +0100
+++ b/util/SMALL_init_solver.m	Mon Jul 25 17:27:05 2011 +0100
@@ -1,4 +1,4 @@
-function solver = SMALL_init_solver(varargin)
+function solver = SMALL_init_solver(toolbox, name, param, profile)
 %%   Function initialise SMALL structure for sparse representation.
 %   Optional input variables:
 %       toolbox - name of Dictionary Learning toolbox you want to use
@@ -17,11 +17,29 @@
 %
 %%
 
-solver.toolbox=[];
-solver.name=[];
-solver.param=[];
-solver.solution=[];
-solver.reconstructed=[];
-solver.time=[];
+if ~ exist( 'toolbox', 'var' ) || isempty(toolbox) 
+    solver.toolbox = []; 
+else
+    solver.toolbox = toolbox;
+end
+if ~ exist( 'name', 'var' ) || isempty(name) 
+    solver.name = [];
+else
+    solver.name = name;
+end
+if ~ exist( 'param', 'var' ) || isempty(param) 
+    solver.param = [];
+else
+    solver.param = param;
+end
+if ~ exist( 'profile', 'var' ) || isempty(profile) 
+    solver.profile = 1;
+else
+    solver.profile = profile;
+end
+solver.add_constraints = 0;
+solver.solution = [];
+solver.reconstructed = [];
+solver.time = [];
 
 end
\ No newline at end of file