help-octave
[Top][All Lists]
Advanced

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

Re: fscanf transposes matrix


From: Victor Munoz
Subject: Re: fscanf transposes matrix
Date: Fri, 1 Feb 2002 11:29:54 -0300 (CLST)

> Hi,
> I am (quite) new to octave and I am looking for a way to read an entire
> matrix of measurement data from a file at once.
> I now use a=fscanf(file,"%f%f",[2,Inf]) to read a file containing two
> columns of numbers, but the resulting matrix is transposed compared to
> the file. Offcourse, this is easily cured with a ', but it is counter
> intuitive. Reading with [Inf,2] would in my opinion be better, but this
> results in an one column matrix.
> 

 If your data are in matrix form in a file named data.txt, for instance,
isn't it enough to use this?: 
        load data.txt
Columns are read correctly and assigned to a variable named data (filename
without extension).

 Regards,

                        Victor




-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

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