% general - Add subdirectories of general to path
%
% general :: cells { string } => void.
%
% Use general('all') or 
% >> general all
% To add all subdirs to path.
%
% Available subdirectories are:
%    algo       		- Algorithms and APIs
%    arrutils			- General array manipulations
%    cellutils			- Cell manipulations
%    fileutils			- File handling
%    funutils	 		- Functional programming
%    numerical			- Numerical analysis (inc scalar, vector, matrix)
%    discretise 		- Discretisation and quantisation tools

function general(dirs)
	if nargin<1,
		disp('Type >> general all to add all subdirectories to matlab path');
		return;
	end

	if strcmp(dirs,'all')
		dirs={'algo','arrutils','cellutils','fileutils','funutils','numerical','discretise'};
	end
	thisfile=which('general');
	seps=strfind(thisfile,filesep);
	thisdir=thisfile(1:seps(end));
	for i=1:length(dirs)
		addpath([thisdir,dirs{i}]);
	end
end

