From help-octave-request at che dot utexas dot edu Mon Feb 14 18:58:59 1994 Subject: Re: Easy reading of a data file From: John Eaton To: npettiau at ulb dot ac dot be (Pettiaux Nicolas) cc: help-octave at che dot utexas dot edu Date: Mon, 14 Feb 94 18:58:58 CST npettiau at ulb dot ac dot be (Pettiaux Nicolas) wrote: : We are starting to use Octave. Is there an easy way to : read column data files in octave or does it have to be done : with the other C-style input/output functions ? : : ie. : : AI want to read in a file containing : : a aa : b bb : c cc : ... You can do it with C-style I/O functions, but it is probably much faster to do it with the load command. To do this, you will need to add some comments to the beginning of the file that tell Octave how much data to expect, and the variable name to store it in. The load command expects data in the same format as created by the save command. You can do something like a = [1,2;3,4] save - a to get an example of the format used by the save command. (Using `-' as the file name tells save to print to the screen instead of saving the data in a file.) jwe