problem in reading text files
Dmitri A. Sergatskov
dasergatskov at gmail.com
Fri Sep 5 08:08:52 CDT 2008
Ben, -- I assume you forgot to CC it to the octave-bug
On Fri, Sep 5, 2008 at 5:48 AM, Ben Abbott <bpabbott at mac.com> wrote:
>
> On Sep 4, 2008, at 11:27 PM, Yaping Zhou wrote:
>
>> Dmitri Ben:
>>
>> Thanks.
>>
>> Dmitri said he was using 3.0.2. What version are you Ben using?
>>
>> I was using 3.0.1 in Windows and here are what I got. OK.txt was loaded
>> successfully while NotOK.txt wasn't OK.
>>
>> <11629977.gif>
>>
>>
> I'm running 3.0.1.
>
> However, it won't make any difference. The problem is with the EOL
> character.
>
> Can someone who knows tell us if the Octave expects the same EOL character
> for files on all OS's, if Octave is intended to be agnostic to dos/mac/unix
> EOL characters, or if different EOL characters are expected depending upon
> OS?
I think it is a bug.
It works with any termination if the file in "-ascii" format (no header).
But in ASCII format one cannot save complex numbers. I assume this is a feature,
though it is not documented, it just prints a warning:
octave:1> z = ones(3,3) + 2i * ones(3,3)
z =
1 + 2i 1 + 2i 1 + 2i
1 + 2i 1 + 2i 1 + 2i
1 + 2i 1 + 2i 1 + 2i
octave:2> save -ascii "z.dat" z
warning: save: omitting imaginary part for ASCII file
>
> Ben
>
>
>
Sincerely,
Dmitri.
--
More information about the Bug-octave
mailing list