Set path won't save with WFDB
    5 views (last 30 days)
  
       Show older comments
    
I am trying to setup WFDB in Debian 8.5 MATLAB 2016b by the official instructions given here but I get the following warning, which I attempted to solve unsuccessfully by `chmod 755 /usr/local/MATLAB/R2016b/toolbox/local/pathdef.m`. In MATLAB 2016b prompt
>> [old_path]=which('rdsamp');if(~isempty(old_path)) rmpath(old_path(1:end-8)); end
cd wfdb-app-toolbox/mcode
addpath(pwd);savepath
Warning: Unable to save path to file
'/usr/local/MATLAB/R2016b/toolbox/local/pathdef.m'. You can save your path to
a different location by calling SAVEPATH with an input argument that specifies
the full path. For MATLAB to use that path in future sessions, save the path
to 'pathdef.m' in your MATLAB startup folder. 
> In savepath (line 169) 
>> pwd
ans =
/home/masi/Documents/DI/wfdb-app-toolbox/mcode
The file `/usr/local/MATLAB/2016b/toolbox/local/pathdef.m` has sufficient write permission (755 now). Here a list of some permissions in the corresponding tree heads and work process to change the permission of pathdef.m to 755
root@masi:/home/masi/Documents/DI# ls -la /usr/local/MATLAB/R2016b/ | head
total 208
drwxr-sr-x  23 root staff  4096 Nov  6 09:19 .
drwxr-sr-x   4 root staff  4096 Nov  4 17:39 ..
drwxr-sr-x   5 root staff  4096 Nov  6 00:26 appdata
drwxr-sr-x   6 root staff  4096 Nov  6 00:24 bin
drwxr-sr-x   2 root staff  4096 Nov  6 00:19 bugreport
drwxr-sr-x   3 root staff  4096 Nov  6 00:19 cefclient
drwxr-sr-x   3 root staff  4096 Nov  6 00:19 etc
drwxr-sr-x  70 root staff  4096 Nov  6 00:26 examples
drwxr-sr-x   7 root staff  4096 Nov  6 00:19 extern
root@masi:/home/masi/Documents/DI# ls -la /usr/local/MATLAB/R2016b/toolbox/ | head
total 348
drwxr-sr-x 87 root staff 4096 Nov  6 00:26 .
drwxr-sr-x 23 root staff 4096 Nov  6 09:19 ..
drwxr-sr-x  4 root staff 4096 Nov  6 00:21 aero
drwxr-sr-x  6 root staff 4096 Nov  6 00:21 aeroblks
drwxr-sr-x  4 root staff 4096 Nov  6 00:21 antenna
drwxr-sr-x  8 root staff 4096 Nov  6 00:21 audio
drwxr-sr-x 11 root staff 4096 Nov  6 00:21 bioinfo
drwxr-sr-x 25 root staff 4096 Nov  6 00:25 coder
drwxr-sr-x 10 root staff 4096 Nov  6 00:21 comm
root@masi:/home/masi/Documents/DI# ls -la /usr/local/MATLAB/R2016b/toolbox/local/ | head
total 284
drwxr-sr-x  6 root staff  4096 Nov  6 00:26 .
drwxr-sr-x 87 root staff  4096 Nov  6 00:26 ..
-r--r--r--  1 root staff   414 Feb 17  2016 classloader.txt
drwxr-sr-x  5 root staff 12288 Nov  6 00:26 classpath
-rw-r--r--  1 root staff 52154 Nov  6 00:26 classpath.txt
-r--r--r--  1 root staff   909 Sep 11  2015 Contents.m
-r--r--r--  1 root staff 39839 Mar 26  2013 CorrectionData.txt
-r--r--r--  1 root staff   670 Jul  5  2013 finishdlg.m
-r--r--r--  1 root staff   383 Jul  5  2013 finishsav.m
root@masi:/home/masi/Documents/DI# ls -la /usr/local/MATLAB/R2016b/toolbox/local/ 
total 284
drwxr-sr-x  6 root staff  4096 Nov  6 00:26 .
drwxr-sr-x 87 root staff  4096 Nov  6 00:26 ..
-r--r--r--  1 root staff   414 Feb 17  2016 classloader.txt
drwxr-sr-x  5 root staff 12288 Nov  6 00:26 classpath
-rw-r--r--  1 root staff 52154 Nov  6 00:26 classpath.txt
-r--r--r--  1 root staff   909 Sep 11  2015 Contents.m
-r--r--r--  1 root staff 39839 Mar 26  2013 CorrectionData.txt
-r--r--r--  1 root staff   670 Jul  5  2013 finishdlg.m
-r--r--r--  1 root staff   383 Jul  5  2013 finishsav.m
-r-xr-xr-x  1 root staff  3356 May  1  2015 getphlpaths.pl
-r--r--r--  1 root staff  1014 Dec 11  2007 helperr.html
-r--r--r--  1 root staff  6173 Nov 16  2015 hgrc.m
-r--r--r--  1 root staff  1363 Jul  5  2013 initprefs.m
-r--r--r--  1 root staff   258 Jun 26  2012 librarypath.txt
-r--r--r--  1 root staff  4024 Jul  5  2013 license.m
-r--r--r--  1 root staff   466 Dec 28  2009 linkerr.html
drwxr-sr-x  3 root staff  4096 Nov  6 00:19 +matlab
-r--r--r--  1 root staff  7974 Apr 19  2016 matlabrc.m
-r-xr-xr-x  1 root staff    17 Oct  8  2008 mime.types
drwxr-sr-x  2 root staff 20480 Nov  6 00:26 path
-r--r--r--  1 root staff 47673 Nov  6 09:35 pathdef.m
-r--r--r--  1 root staff  2482 Oct 20  2014 printopt.m
-r--r--r--  1 root staff  2604 Apr  9  2016 restoredefaultpath.m
-r--r--r--  1 root staff  1106 Jul  7 11:03 simulinkrc.m
-r--r--r--  1 root staff   498 Jul  5  2013 startpage.m
-r--r--r--  1 root staff   344 Jul  5  2013 startupsav.m
-r--r--r--  1 root staff   145 Jul 22 18:25 supportpackagerootsetting.xml
drwxr-sr-x  2 root staff  4096 Nov  6 00:20 template
-r--r--r--  1 root staff  1534 Jul  5  2013 toolbox_path_cache.m
-r--r--r--  1 root staff  3648 Apr  7  2016 userpath.m
-r--r--r--  1 root staff   876 Jul  5  2013 version.m
root@masi:/home/masi/Documents/DI# chmod 755 /usr/local/MATLAB/R2016b/toolbox/local/pathdef.m 
root@masi:/home/masi/Documents/DI# ls -la /usr/local/MATLAB/R2016b/toolbox/local/ | grep pathdef
-rwxr-xr-x  1 root staff 47673 Nov  6 09:35 pathdef.m
root@masi:/home/masi/Documents/DI# ls -la /usr/local/MATLAB/R2016b/toolbox/ | grep local
drwxr-sr-x  6 root staff 4096 Nov  6 00:26 local
This line is what I have used to overcome the `pathdef.m` issue with WFDB in every script
addpath(fullfile(home, 'Documents/DI/', 'wfdb-app-toolbox', 'mcode'));
The output is unsuccessful
Error using rdsamp (line 203)
Could not find record: NSRDB/16272. Search path is set to: '.
/home/masi/Documents/DI/wfdb-app-toolbox/mcode/../database/ http://physionet.org/physiobank/database/'
Error in vertaa (line 165)
        [~, cSignals{cIndex}]=rdsamp(strcat(database,num2str(patient)),channel); % plot(tm,sig);
It has worked before but not now. Please, let me know how to solve the primary `pathdef.m` issue or the workaround.
0 Comments
Answers (0)
See Also
Categories
				Find more on Introduction to Installation and Licensing in Help Center and File Exchange
			
	Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!