tyler-tomita / RandomerForest

Discriminant Projection Forest results, datasets, etc.
44 stars 21 forks source link

make all paths relative #22

Closed jovo closed 9 years ago

jovo commented 9 years ago

i use this snippet in the beginning of all such files:

''' clearvars, clc, fpath = mfilename('fullpath'); findex=strfind(fpath,'/'); rootDir=fpath(1:findex(end-1)); p = genpath(rootDir); gits=strfind(p,'.git'); colons=strfind(p,':'); for i=0:length(gits)-1 endGit=find(colons>gits(end-i),1); p(colons(endGit-1):colons(endGit)-1)=[]; end addpath(p); '''