[Top][All Lists]

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

Re: Alternative missing values in readcsv?

From: Jordi Gutiérrez Hermoso
Subject: Re: Alternative missing values in readcsv?
Date: Tue, 16 Feb 2010 08:54:45 -0600

On 15 February 2010 23:11, fw <address@hidden> wrote:
> Is there a way to specify alternative missing values when reading a csv file?
> For example, if I read the line "1,,100,0,10", the matrix will be [1 0 100 0
> 10], while I would MUCH prefer to get [1 nan 100 0 10].
> I realize that i can use another program to alter the input file, but that
> seems unnecessarily painful.

How about

     A(find(isnan(A))) = 0

after you've read into A from your CSV file?

reply via email to

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