view general/general.m @ 6:0ce3c2070089

Removed duplicate code and fixed doc in timed_action.
author samer
date Mon, 14 Jan 2013 14:33:37 +0000
parents e44f49929e56
children db7f4afd27c5
line wrap: on
line source
% 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