[Top][All Lists]

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

Re: Problems with fileread

From: Doug Stewart
Subject: Re: Problems with fileread
Date: Sun, 26 Feb 2012 11:47:19 -0500

On Sun, Feb 26, 2012 at 10:43 AM, John W. Eaton <address@hidden> wrote:
On 26-Feb-2012, Terry Duell wrote:

| I am running Octave 3.6.1, and have encountered a difficulty with fileread.
| I am advised that the code segment (runtestdata.m) below which reads the
| test data from a file (testdata) OK in Matlab and displays the data as
| expected, but does not work for me in Octave.
| In Matlab the code reads the data in the first 3 records into 'header',
| then reads the values '0.30, 0.21...' etc into 'data', then does a str2num
| conversion on 'data' to put the values into 'y'.
| Here, in Octave, the string 'data' starts out as follows...
| 0
| 0
| .
| 2
| 1
| I guess some tweaking of the character counts (104, 105) will affect that,
| but I wouldn't have expected the behaviour of Octave and Matlab to be
| different.
| In addition, if I check the size of 'y' after the str2num conversion, the
| response is ...
| ans =
|     0   0
| Is the behaviour I'm seeing the result of a bug?

If there is an incompatibility, please file a bug report so that the
issue won't be forgotten.

Is the Matlab behavior documented?


Help-octave mailing list

I read what matlab has online and it doesn't say anything about the result being a column or row vector
but just that it returns a string. Shouldn't a string be a row vector? Octave returns a column vector now, and I think we should change it.

Any thoughts?



reply via email to

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