help-octave
[Top][All Lists]
Advanced

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

Re: octave-4.4.2 fails to load created by it empty text file - binary OK


From: Nicholas Jankowski
Subject: Re: octave-4.4.2 fails to load created by it empty text file - binary OK
Date: Fri, 26 Apr 2019 21:49:48 -0400

On Fri, Apr 26, 2019 at 8:31 PM Sergei Steshenko <address@hidden> wrote:
Hello All,

the following sequence:

"

octave:1> foo = []
foo = [](0x0)
octave:2> save('-ascii', 'foo.txt', 'foo')
octave:3> load('-ascii', 'foo.txt')
error: load: file 'foo.txt' seems to be empty!
octave:3> version
ans = 4.2.2
"

explains is it all. Is it the way it is supposed to be ?



With binary:

"

octave:4> foo = []
foo = [](0x0)
octave:5> save('-binary', 'foo.bin', 'foo')
octave:6> load('-binary', 'foo.bin')
octave:7> foo
foo = [](0x0)
octave:8>
"

works as expected.



from a compatibility perspective, Matlab loads an empty variable for both ascii and binary files. 

On Fri, Apr 26, 2019 at 8:31 PM Sergei Steshenko <address@hidden> wrote:
Hello All,

the following sequence:

"

octave:1> foo = []
foo = [](0x0)
octave:2> save('-ascii', 'foo.txt', 'foo')
octave:3> load('-ascii', 'foo.txt')
error: load: file 'foo.txt' seems to be empty!
octave:3> version
ans = 4.2.2
"

explains is it all. Is it the way it is supposed to be ?



With binary:

"

octave:4> foo = []
foo = [](0x0)
octave:5> save('-binary', 'foo.bin', 'foo')
octave:6> load('-binary', 'foo.bin')
octave:7> foo
foo = [](0x0)
octave:8>
"

works as expected.


--Sergei.




reply via email to

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