Closed jovo closed 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); '''
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); '''