help-octave
[Top][All Lists]
Advanced

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

Re: Nan and write on excel "65535"


From: Nicholas Jankowski
Subject: Re: Nan and write on excel "65535"
Date: Mon, 20 May 2019 11:52:00 -0400

using Octave 5.1.0 on Windows 10 Pro, with MS Office 2013 and Java(TM)
SE Runtime Environment (build 1.8.0_212-b10)
(I don't have a pc without MS Office for testing.)

my simple test case:

>> pkg load windows;
>> pkg load io;
>> arrayNA = NA(5)
arrayNA =
    NA    NA    NA    NA    NA
    NA    NA    NA    NA    NA
    NA    NA    NA    NA    NA
    NA    NA    NA    NA    NA
    NA    NA    NA    NA    NA
>> arrayNAN = NaN(5)
arrayNAN =
   NaN   NaN   NaN   NaN   NaN
   NaN   NaN   NaN   NaN   NaN
   NaN   NaN   NaN   NaN   NaN
   NaN   NaN   NaN   NaN   NaN
   NaN   NaN   NaN   NaN   NaN
>> status = xlswrite('testna.xlsx',arrayNA)
status =  1
>> status = xlswrite('testnan.xlsx',arrayNAN)
status =  1
>> status = odswrite('testna.ods',arrayNA)
status =  1
>> status = odswrite('testnan.ods',arrayNAN)
status =  1

Looking at the files,  both of the xlsx files show:

65535 65535 65535 65535 65535
65535 65535 65535 65535 65535
65535 65535 65535 65535 65535
65535 65535 65535 65535 65535
65535 65535 65535 65535 65535

both of the .ods files show:

0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0


Note that Excel has a built in NA(), but not NAN(). I don't know if it
can represent NaN and just doesn't have it as a built in function or
anyway I can quickly see to input one.

unless this in a known event, it seems at least the mismatch between
output filetypes is a concern. for compatibly concerns, Matlab 2018b
has no representation of NA, but for NaN produces an empty
spreadsheet.



reply via email to

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