annotate general/general.m @ 61:eff6bddf82e3
tip
Finally implemented perceptual brightness thing.
author |
samer |
date |
Sun, 11 Oct 2015 10:20:42 +0100 |
parents |
db7f4afd27c5 |
children |
|
rev |
line source |
samer@4
|
1 % general - Add subdirectories of general to path
|
samer@4
|
2 %
|
samer@4
|
3 % general :: cells { string } => void.
|
samer@4
|
4 %
|
samer@4
|
5 % Use general('all') or
|
samer@4
|
6 % >> general all
|
samer@4
|
7 % To add all subdirs to path.
|
samer@4
|
8 %
|
samer@4
|
9 % Available subdirectories are:
|
samer@4
|
10 % algo - Algorithms and APIs
|
samer@4
|
11 % arrutils - General array manipulations
|
samer@4
|
12 % cellutils - Cell manipulations
|
samer@4
|
13 % fileutils - File handling
|
samer@4
|
14 % funutils - Functional programming
|
samer@4
|
15 % numerical - Numerical analysis (inc scalar, vector, matrix)
|
samer@4
|
16 % discretise - Discretisation and quantisation tools
|
samer@4
|
17
|
samer@4
|
18 function general(dirs)
|
samer@4
|
19 if nargin<1,
|
samer@4
|
20 disp('Type >> general all to add all subdirectories to matlab path');
|
samer@4
|
21 return;
|
samer@4
|
22 end
|
samer@4
|
23
|
samer@4
|
24 if strcmp(dirs,'all')
|
samer@16
|
25 dirs={'algo','arrutils','cellutils','fileutils','funutils','discretise', ...
|
samer@16
|
26 'numerical','numerical/scalar','numerical/array','numerical/matrix'};
|
samer@4
|
27 end
|
samer@4
|
28 thisfile=which('general');
|
samer@4
|
29 seps=strfind(thisfile,filesep);
|
samer@4
|
30 thisdir=thisfile(1:seps(end));
|
samer@4
|
31 for i=1:length(dirs)
|
samer@4
|
32 addpath([thisdir,dirs{i}]);
|
samer@4
|
33 end
|
samer@4
|
34 end
|
samer@4
|
35
|