changeset 203:f3b6ddd2f04f luisf_dev

checks if the variable SMALL_path exists, and exits otherwise.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Tue, 20 Mar 2012 15:52:22 +0000
parents 751fa3bddd30
children 5fe60504a6a9
files util/SMALL_learn.m util/SMALL_solve.m
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/util/SMALL_learn.m	Tue Mar 20 14:28:51 2012 +0000
+++ b/util/SMALL_learn.m	Tue Mar 20 15:52:22 2012 +0000
@@ -21,6 +21,10 @@
 
 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
+
 if (DL.profile)
     fprintf('\nStarting Dictionary Learning %s... \n', DL.name);
 end
--- a/util/SMALL_solve.m	Tue Mar 20 14:28:51 2012 +0000
+++ b/util/SMALL_solve.m	Tue Mar 20 15:52:22 2012 +0000
@@ -20,6 +20,10 @@
 
 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
+
 if isa(Problem.A,'float')
     A = Problem.A;
     SparseLab_A=Problem.A;