From bug-octave-request at bevo dot che dot wisc dot edu Thu May 10 11:21:27 2001 Subject: problem with exist(fn)==2 and load(fn); From: Alois =?iso-8859-1?Q?Schl=F6gl?= To: bug-octave at bevo dot che dot wisc dot edu Date: Thu, 10 May 2001 11:20:45 -0500 t.mat is a file within LOADPATH but not within the current directory. I get the following result fn='t.mat'; octave:63> exist(fn) ans = 2 octave:64> load t.mat error: load: couldn't open input file `t.mat' error: evaluating index expression near line 64, column 1 Therefore EXIST cannot be used to check the existance of the file fn; and the following statement does not work. if exist(fn)==2, load(fn); end; IMO, if exist(fn) finds the file, also load should be able to find it. Sorry, I've no fix for this problem. Alois ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------