Mercurial > hg > smallbox
comparison SMALLboxSetup.m @ 133:a4e255cfb113 ivand_dev
CVX added to the list of the 3rd party toolboxes
author | Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk> |
---|---|
date | Mon, 11 Jul 2011 13:41:00 +0100 |
parents | 850e90bbf4b0 |
children | 31d2864dfdd4 8d866d96f006 |
comparison
equal
deleted
inserted
replaced
130:037bb7da3703 | 133:a4e255cfb113 |
---|---|
22 clc; | 22 clc; |
23 | 23 |
24 FS=filesep; | 24 FS=filesep; |
25 | 25 |
26 fprintf('\n ********************************************************************'); | 26 fprintf('\n ********************************************************************'); |
27 fprintf('\n\n This script will install the SMALLbox Evaluation Framework v.0.4'); | 27 fprintf('\n\n This script will install the SMALLbox Evaluation Framework v.1.1'); |
28 fprintf('\n\n It contains the following toolboxes:'); | 28 fprintf('\n\n It contains the following toolboxes:'); |
29 fprintf('\n Sparco version 1.2, incorporating Rice Wavelet Toolbox version 2.4'); | 29 fprintf('\n Sparco version 1.2'); |
30 fprintf('\n SPGL1 Toolbox version 1.7 '); | 30 fprintf('\n SPGL1 Toolbox version 1.7 '); |
31 fprintf('\n SparseLab Toolbox version 2.1'); | 31 fprintf('\n SparseLab Toolbox version 2.1'); |
32 fprintf('\n Sparsify Toolbox version 0.4'); | 32 fprintf('\n Sparsify Toolbox version 0.4'); |
33 fprintf('\n GPSR Toolbox version 5.0'); | 33 fprintf('\n GPSR Toolbox version 5.0'); |
34 fprintf('\n OMPbox version 10'); | 34 fprintf('\n OMPbox version 10'); |
35 fprintf('\n OMPSbox version 1'); | 35 fprintf('\n OMPSbox version 1'); |
36 fprintf('\n KSVDbox version 13'); | 36 fprintf('\n KSVDbox version 13'); |
37 fprintf('\n KSVDSbox version 11'); | 37 fprintf('\n KSVDSbox version 11'); |
38 fprintf('\n Rice Wavelet toolbox'); | |
39 fprintf('\n CVX version 1.21'); | |
38 fprintf('\n\n ********************************************************************'); | 40 fprintf('\n\n ********************************************************************'); |
39 | 41 |
40 fprintf('\n\n The toolbox will be installed in: '); | 42 fprintf('\n\n The toolbox will be installed in: '); |
41 fprintf('\n %s%s\n',pwd,FS); | 43 fprintf('\n %s%s\n',pwd,FS); |
42 fprintf('\n ********************************************************************'); | 44 fprintf('\n ********************************************************************'); |
228 cd(SMALL_path); | 230 cd(SMALL_path); |
229 else | 231 else |
230 fprintf('\n ******************************************************************'); | 232 fprintf('\n ******************************************************************'); |
231 fprintf('\n\n GPSR is already installed'); | 233 fprintf('\n\n GPSR is already installed'); |
232 end | 234 end |
235 %% | |
236 if ~exist('cvx_setup.m','file') | |
237 fprintf('\n ******************************************************************'); | |
238 fprintf('\n\n Initialising CVX Setup'); | |
239 | |
240 try | |
241 CVX_path = [pwd,FS,'toolboxes',FS,'CVX']; | |
242 machine=computer; | |
243 if (strcmp(machine,'PCWIN')||strcmp(machine,'PCWIN64')) | |
244 if exist([CVX_path, FS, 'cvx.zip'],'file'), | |
245 CVX_zip=[CVX_path, FS,'cvx.zip']; | |
246 else | |
247 CVX_zip='http://cvxr.com/cvx/cvx.zip'; | |
248 fprintf('\n\n Downloading toolbox, please be patient\n\n'); | |
249 end | |
250 unzip(CVX_zip,CVX_path); | |
251 else | |
252 if exist([CVX_path, FS, 'cvx.tar.gz'],'file'), | |
253 CVX_tar=[CVX_path, FS,'cvx.tar.gz']; | |
254 else | |
255 CVX_tar='http://cvxr.com/cvx/cvx.tar.gz'; | |
256 fprintf('\n\n Downloading toolbox, please be patient\n\n'); | |
257 end | |
258 untar(CVX_tar,CVX_path); | |
259 end | |
260 cd([CVX_path,FS,'cvx']); | |
261 fprintf('\n\n Running cvx_setup.m script \n\n'); | |
262 cvx_setup; | |
263 fprintf('\n\n Ignore the cvx_setup note about adding the path. It is done automatically in SMALLbox \n\n'); | |
264 CVX_p=genpath(CVX_path); | |
265 addpath(CVX_p); | |
266 fprintf('\n CVX Installation Successful\n'); | |
267 catch | |
268 fprintf('\n CVX Installation Failed'); | |
269 end | |
270 cd(SMALL_path); | |
271 else | |
272 fprintf('\n ******************************************************************'); | |
273 fprintf('\n\n CVX is already installed'); | |
274 end | |
233 | 275 |
234 %% | 276 %% |
235 | 277 |
236 if ~exist('ksvdver.m','file') | 278 if ~exist('ksvdver.m','file') |
237 fprintf('\n ******************************************************************'); | 279 fprintf('\n ******************************************************************'); |
256 else | 298 else |
257 KSVD_zip='http://www.cs.technion.ac.il/%7Eronrubin/Software/ksvdbox13.zip'; | 299 KSVD_zip='http://www.cs.technion.ac.il/%7Eronrubin/Software/ksvdbox13.zip'; |
258 fprintf('\n\n Downloading toolbox, please be patient\n\n'); | 300 fprintf('\n\n Downloading toolbox, please be patient\n\n'); |
259 end | 301 end |
260 unzip(KSVD_zip,[KSVD_path, FS, 'ksvdbox']); | 302 unzip(KSVD_zip,[KSVD_path, FS, 'ksvdbox']); |
261 cd([KSVD_path, FS, 'ksvdbox', FS, 'private']); | 303 % cd([KSVD_path, FS, 'ksvdbox', FS, 'private']); |
262 make; | 304 % make; |
263 cd(SMALL_path); | 305 % cd(SMALL_path); |
264 KSVD_p=genpath(KSVD_path); | 306 KSVD_p=genpath(KSVD_path); |
265 addpath(KSVD_p); | 307 addpath(KSVD_p); |
266 fprintf('\n KSVDBox and OMPBox Installation Successful\n'); | 308 fprintf('\n KSVDBox and OMPBox Installation Successful\n'); |
267 catch | 309 catch |
268 fprintf('\n KSVDBox and OMPBox Installation Failed'); | 310 fprintf('\n KSVDBox and OMPBox Installation Failed'); |
346 end | 388 end |
347 | 389 |
348 else | 390 else |
349 fprintf('\n ******************************************************************'); | 391 fprintf('\n ******************************************************************'); |
350 fprintf('\n\n matlab_midi (http://www.kenschutte.com/midi/) is already installed'); | 392 fprintf('\n\n matlab_midi (http://www.kenschutte.com/midi/) is already installed'); |
351 end | 393 end |
352 | 394 |
353 cd([SMALL_path,FS,'util',FS,'ksvd utils']); | 395 %% KSVD utils setup |
354 make | 396 |
355 cd(SMALL_path); | 397 if ~(exist('addtocols')==3) |
356 %% | 398 cd([SMALL_path,FS,'util',FS,'ksvd utils']); |
357 cd([SMALL_path, FS, 'util', FS, 'Rice Wavelet Toolbox']) | 399 make |
400 cd(SMALL_path); | |
401 end | |
402 | |
403 %% RWT setup | |
404 if ~(exist('mdwt')==3) | |
405 cd([SMALL_path, FS, 'util', FS, 'Rice Wavelet Toolbox']) | |
358 fprintf('Compiling the Rice Wavelet Toolbox MEX interfaces...'); | 406 fprintf('Compiling the Rice Wavelet Toolbox MEX interfaces...'); |
359 try | 407 try |
360 if exist('mdwt' ,'file')~=3, mex mdwt.c; end | 408 if exist('mdwt' ,'file')~=3, mex mdwt.c; end |
361 if exist('midwt' ,'file')~=3, mex midwt.c; end | 409 if exist('midwt' ,'file')~=3, mex midwt.c; end |
362 if exist('mrdwt' ,'file')~=3, mex mrdwt.c; end | 410 if exist('mrdwt' ,'file')~=3, mex mrdwt.c; end |
363 if exist('mirdwt','file')~=3, mex mirdwt.c; end | 411 if exist('mirdwt','file')~=3, mex mirdwt.c; end |
364 fprintf('Rice Wavelet Toolbox Installation Successful!\n\n'); | 412 fprintf('Rice Wavelet Toolbox Installation Successful!\n\n'); |
365 catch | 413 catch |
366 warning('Could not compile Rice Wavelet Toolbox MEX interfaces.\n'); | 414 warning('Could not compile Rice Wavelet Toolbox MEX interfaces.\n'); |
367 end | 415 end |
368 cd(SMALL_path); | 416 cd(SMALL_path); |
369 | 417 end |
418 %% | |
370 fprintf('\n ******************************************************************'); | 419 fprintf('\n ******************************************************************'); |
371 fprintf('\n\n Initialising SMALLbox Examples Setup'); | 420 fprintf('\n\n Initialising SMALLbox Examples Setup'); |
372 | 421 |
373 % % Need to do a bit of temporary housekeeping first. | 422 % % Need to do a bit of temporary housekeeping first. |
374 % cd(SMALL_path); | 423 % cd(SMALL_path); |
394 fprintf('\n\n Sparco: http://www.cs.ubc.ca/labs/scl/sparco/'); | 443 fprintf('\n\n Sparco: http://www.cs.ubc.ca/labs/scl/sparco/'); |
395 fprintf('\n\n SPGL1: http://www.cs.ubc.ca/labs/spgl1/?n=HomePage'); | 444 fprintf('\n\n SPGL1: http://www.cs.ubc.ca/labs/spgl1/?n=HomePage'); |
396 fprintf('\n\n SparseLab: http://sparselab.stanford.edu/ (PLEASE REGISTER SPARSELAB!)'); | 445 fprintf('\n\n SparseLab: http://sparselab.stanford.edu/ (PLEASE REGISTER SPARSELAB!)'); |
397 fprintf('\n\n Sparsify: http://www.see.ed.ac.uk/~tblumens/sparsify/sparsify.html'); | 446 fprintf('\n\n Sparsify: http://www.see.ed.ac.uk/~tblumens/sparsify/sparsify.html'); |
398 fprintf('\n\n GPSR: http://www.lx.it.pt/~mtf/GPSR/'); | 447 fprintf('\n\n GPSR: http://www.lx.it.pt/~mtf/GPSR/'); |
448 fprintf('\n\n CVX: http://cvxr.com/cvx/'); | |
399 fprintf('\n\n OMPbox and KSVDBox: http://www.cs.technion.ac.il/~ronrubin/\n'); | 449 fprintf('\n\n OMPbox and KSVDBox: http://www.cs.technion.ac.il/~ronrubin/\n'); |
400 | 450 |
401 | 451 |
402 % LIST DEMOS FROM EXAMPLE DIRECTORY... | 452 % LIST DEMOS FROM EXAMPLE DIRECTORY... |
403 | 453 |