| 1 | 
 % | 
 % | 
| 2 | 
 % [] = PV_CHECKPATH() | 
 % [] = pv_checkpath() | 
| 3 | 
 % | 
 % | 
| 4 | 
 % This function detects where the package gmaze_pv is installed | 
 % This function detects where the package gmaze_pv is installed | 
| 5 | 
 % (the upper level directory where the function volbet2iso | 
 % (the upper level directory where the function volbet2iso | 
| 20 | 
  | 
  | 
| 21 | 
  | 
  | 
| 22 | 
 % Try to found needed subdirectories: | 
 % Try to found needed subdirectories: | 
| 23 | 
 subdir     = 'subfct'; | 
  | 
| 24 | 
 fullsubdir = strcat(packdir,sla,subdir); | 
 subdir     = struct('name',{'subfct','test','visu'}); | 
| 25 | 
 if isempty(findstr(path,fullsubdir)) | 
  | 
| 26 | 
   addpath(fullsubdir) | 
 for id = 1 : size(subdir(:),1) | 
| 27 | 
 end | 
   subdirname = subdir(id).name; | 
| 28 | 
  | 
   fullsubdir = strcat(packdir,sla,subdirname); | 
| 29 | 
  | 
   if isempty(findstr(path,fullsubdir)) | 
| 30 | 
  | 
     addpath(fullsubdir) | 
| 31 | 
  | 
   end %if | 
| 32 | 
  | 
 end %for |