[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: str2double behavior
From: |
Rik |
Subject: |
Re: str2double behavior |
Date: |
Mon, 06 Jun 2011 14:46:26 -0700 |
One last question before I post a changeset for comments.
Does Matlab return a complex NaN or real NaN for unparseable inputs?
str2double ({ "abc"; "4i" })
returns
NaN + 0i
0 + 4i
with the current 3.4.0 implementation. It seems like it should be NaN +
NaNi instead. If Matlab returns NaN + NaNi, then are they being extra
clever and narrowing results to real if the only complex values are NaN?
Test case is
str2double ({ "abc"; "4" })
Thanks,
Rik