[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help with fopen and fread
From: |
Glenn Oliver |
Subject: |
Help with fopen and fread |
Date: |
Sat, 10 Jun 2006 15:43:24 -0700 (PDT) |
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");
freport
[samplenum,countsamp] = fread(fid,Inf,"uint32",44,"ieee-be");
I get this from freport:
number mode arch name
------ ---- ---- ----
0 r ieee_little_endian stdin
1 w ieee_little_endian stdout
2 w ieee_little_endian stderr
and the error returned is this:
error: fread: invalid stream number = -1
error: called from `test_processor:get_incsum_tflp_from_raw' in file
`/octave_files/test_processor.m'
error: called from `test_processor' in file `/octave_files/test_processor.m'
I can use any suggestions offered as this has been a real hitch in
completely automating a task on a server which heretofore has required an
Engineer to do each day.
Thank you,
Glenn Oliver
--
View this message in context:
http://www.nabble.com/Help-with-fopen-and-fread-t1768134.html#a4812276
Sent from the Octave - General forum at Nabble.com.
- Help with fopen and fread,
Glenn Oliver <=