From help-octave-request at che dot utexas dot edu Tue Jan 31 13:47:54 1995 Subject: Re: Reading binary data. From: vdp at us0 dot mayo dot EDU (Vinayak Dutt) To: help-octave at che dot utexas dot edu Date: Tue, 31 Jan 95 13:47:17 CST #I'm new to this list so please forgive me for asking a question which #may have already been covered. Can Octave read a binary data file? #The 200 page Octave manual indicates that fread will read binary data #but that the binary file must first be opened by fopen. The problem #is that the manual entry for fopen only allows text files. I've tried #playing with fopen and fread in various ways but fread always returns #a count of zero. I'm running on a SPARC-10 using the precompiled code #I downloaded from: #ftp.che.utexas.edu:/pub/octave/BINARIES/sparc-sun-sunos4.1.2 # The manual also indicates you can simply give the filename to fread #rather than the file-id returned from fopen. I tried that and it still #gave me count=zero. # i have used fopen() to open a binary file. fopen() should open any type of file, not just text file. you would require octave version 1.1 to read binary files though (using fread()). --vinayak- /* * vinayak dutt * graduate student, ultrasound research * mayo graduate school, rochester mn * * e-mail: vdp at mayo dot edu * dutt dot vinayak at mayo dot edu * */ #include "disclaimer.h"