help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with fopen and fread


From: John W. Eaton
Subject: Help with fopen and fread
Date: Sat, 10 Jun 2006 21:13:17 -0400

On 10-Jun-2006, Glenn Oliver wrote:

| 
| I am new to Octave and to Linux in general.  I am trying to port over some
| working matlab code to a Linux Red Hat ES4 server running Octave 2.1.57 and
| am getting errors in opening my input file.  I am trying now to run this on
| my home machine where I have installed Octave 2.1.73 and get the same
| errors.  My input file is binary and resides co-incidental with the .m file.  
| 
| Code in question is simple and works in matlab 7.13:
| fid = fopen("filename","r","ieee-be");

Is the filename really "filename" or something else?

Is the file in the current directory, or are you using a relative
pathname (i.e., "foo/bar.dat") or an absolute name (i.e.,
"/foo/bar.dat").

Are you expecting the file to be found in your MATLABPATH (which would
be Octave's LOADPATH)?  Octave's fopen function does not search the
load path for files, though perhaps it should (with at least an
optional warning, since I think this seems like a potentially bad
feature).  See also the Octave function file_in_loadpath if you need
to find a file in the load path.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]