diff util/SMALL_init_DL.m @ 152:485747bf39e0 ivand_dev

Two step dictonary learning - Integration of the code for dictionary update and dictionary decorrelation from Boris Mailhe
author Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk>
date Thu, 28 Jul 2011 15:49:32 +0100
parents 8e660fd14774
children
line wrap: on
line diff
--- a/util/SMALL_init_DL.m	Tue Jul 26 16:01:17 2011 +0100
+++ b/util/SMALL_init_DL.m	Thu Jul 28 15:49:32 2011 +0100
@@ -1,4 +1,4 @@
-function DL = SMALL_init_DL(varargin)
+function DL = SMALL_init_DL(toolbox, name, param, profile)
 %%   Function initialise SMALL structure for Dictionary Learning.
 %   Optional input variables:
 %       toolbox - name of Dictionary Learning toolbox you want to use
@@ -17,9 +17,27 @@
 %
 %%
 
-DL.toolbox=[];
-DL.name=[];
-DL.param=[];
+if ~ exist( 'toolbox', 'var' ) || isempty(toolbox) 
+    DL.toolbox = []; 
+else
+    DL.toolbox = toolbox;
+end
+if ~ exist( 'name', 'var' ) || isempty(name) 
+    DL.name = [];
+else
+    DL.name = name;
+end
+if ~ exist( 'param', 'var' ) || isempty(param) 
+    DL.param = [];
+else
+    DL.param = param;
+end
+if ~ exist( 'profile', 'var' ) || isempty(profile) 
+    DL.profile = 1;
+else
+    DL.profile = profile;
+end
+
 DL.D=[];
 DL.time=[];
 end
\ No newline at end of file