octave-maintainers
[Top][All Lists]
Advanced

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

Re: str2double behavior


From: Michael D Godfrey
Subject: Re: str2double behavior
Date: Mon, 06 Jun 2011 11:15:58 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Thunderbird/3.1.10

On 06/06/2011 10:57 AM, Ben Abbott wrote:
On Jun 6, 2011, at 1:42 PM, Rik wrote:

> Julien,
> 
> Can you check what the following does?
> 
> str2double ({ "1.5", [2.5] })
> 
> If it returns
> 
> [ 1.5, NaN ]
> 
> then Octave will need to look at each value in the cell array.  Currently
> we only check that *all* values are strings.
> 
> --Rik
I'm running the same version of Matlab is Julien is.

>> str2double ({ '1.5', [2.5] })
ans =

   1.500000000000000                 NaN

Ben

Just for the record, a somewhat newer Matlab says:

>> str2double({'1.5',[2.5]})

ans =

    1.5000       NaN

>> version

ans =

7.9.0.529 (R2009b)

>>


reply via email to

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