[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
API change for function str2double
From: |
Carnë Draug |
Subject: |
API change for function str2double |
Date: |
Fri, 3 Jun 2011 22:40:46 +0100 |
Hi
I just upgraded to 3.4 and noticed that the API for str2double is
slightly different. It no longer returns the status of the conversion.
Was this removal on purpose when rewriting for C or it was just
forgotten (just asking because it's also doesn't appear on the NEWS
hence my surprise).
It used to work this way
[num, status] = str2double {'32, '23', 45'}
where status would be a cell array of the same division of the input
with values of 0 or -1 whether it succeeded or not on the conversion.
Another change of this function is that if one of the values is not a
string, it returns the error: "str2double: wrong type argument `cell'"
while it used to simply return the value 'NaN' for those cases.
Also, the documentation doesn't state that it returns 'NaN' on a
failed conversion. I don't know C so this is all I can help with (see
attached patch). Sorry that I can't be of more help.
Carnë
patch.diff
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- API change for function str2double,
Carnë Draug <=