changeset 216:a986ee86651e luisf_dev

Calls SMALLboxInit in the beginning of both solve and learn, in order not to lose the SMALL_path variable.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Thu, 22 Mar 2012 11:41:04 +0000
parents f0552f962930
children 8b3c71bb44eb
files SMALLboxInit.m util/SMALL_learn.m util/SMALL_solve.m
diffstat 3 files changed, 2 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/SMALLboxInit.m	Wed Mar 21 18:28:43 2012 +0000
+++ b/SMALLboxInit.m	Thu Mar 22 11:41:04 2012 +0000
@@ -1,4 +1,3 @@
-function SMALLboxInit(varargin)
 %%  SMALLboxInit
 %
 %   SMALLbox Initialization
@@ -23,5 +22,4 @@
 
 addpath(genpath(SMALL_path));
 
-end
 
--- a/util/SMALL_learn.m	Wed Mar 21 18:28:43 2012 +0000
+++ b/util/SMALL_learn.m	Thu Mar 22 11:41:04 2012 +0000
@@ -19,11 +19,7 @@
 %   COPYING included with this distribution for more information.
 %%
 
-global SMALL_path
-
-if (isempty(SMALL_path))
-    error('SMALL_learn:varChk', '\nSMALL_path variable is not set... Please run SMALLboxInit and try again.\n\nExiting now...\n');
-end
+SMALLboxInit
 
 if (DL.profile)
     fprintf('\nStarting Dictionary Learning %s... \n', DL.name);
--- a/util/SMALL_solve.m	Wed Mar 21 18:28:43 2012 +0000
+++ b/util/SMALL_solve.m	Thu Mar 22 11:41:04 2012 +0000
@@ -18,11 +18,7 @@
 %
 %%
 
-global SMALL_path
-
-if (isempty(SMALL_path))
-    error('SMALL_solve:varChk', '\nSMALL_path variable is not set... Please run SMALLboxInit and try again.\n\nExiting now...\n');
-end
+SMALLboxInit
 
 if isa(Problem.A,'float')
     A = Problem.A;