help-octave
[Top][All Lists]
Advanced

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

Re: : new to octave, confused about load(), dlmread et cetera


From: Jaroslav Hajek
Subject: Re: : new to octave, confused about load(), dlmread et cetera
Date: Wed, 1 Sep 2010 21:36:48 +0200

On Wed, Sep 1, 2010 at 6:10 PM, fork <address@hidden> wrote:
> Justin Cress <boywonder410 <at> gmail.com> writes:
>
>>
>>
>
> (not the original poster, but an interested party in octave data handling, 
> which
> leaves a lot to be desired at the moment)
>
>> Great code, why do you grab the first two lines? in case headers spill over?
>
> dlmread snarfs everything unless you tell it where to start (the code below 
> code
> have used a parameter to tell it to start reading at the second line.
>
>> Why do you remove zeros ?
>
> Matlab's dlmread puts zero into every empty or unparseable field, so one has 
> to
> compensate for it.  (Yes, this is UTTERLY LAME behavior, they should be NaN, 
> but
> for compatibility we follow it. str2double() might be useful in a loop that
> reads lines, as it allows for subbing NaNs for empties.)
>
>

FYI, Octave 3.4 will support custom empty value in dlmread, as well as
calling dlmread with an open file ID instead of file name. Based on
popular demand :)


-- 
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

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