# HG changeset patch # User Rik # Date 1378913709 25200 # Node ID f47cfca56eb980c892bad2c79532198876ce8bf1 # Parent 3baf8e7ec3ddb153017e7544df74da7b9ae3fb62 doc: Rephrase a few sentences in str2double docstring. * libinterp/corefcn/str2double.cc: Rephrase a few sentences in str2double docstring. diff -r 3baf8e7ec3dd -r f47cfca56eb9 libinterp/corefcn/str2double.cc --- a/libinterp/corefcn/str2double.cc Fri Sep 06 14:24:05 2013 +0200 +++ b/libinterp/corefcn/str2double.cc Wed Sep 11 08:35:09 2013 -0700 @@ -320,18 +320,20 @@ more digits. The special input values @code{Inf}, @code{NaN}, and @code{NA}\n\ are also accepted.\n\ \n\ -@var{s} can be a character string, a character matrix or a cell array.\n\ +@var{s} may be a character string, character matrix, or cell array.\n\ For character arrays the conversion is repeated for every row, and\n\ -a double or complex array is returned in which rows corresponding to\n\ -zero-length rows in @var{s} are deleted. In case of a cell array @var{s} each\n\ -character string element is processed and a double or complex array of the\n\ -same dimensions as @var{s} is returned.\n\ +a double or complex array is returned. Empty rows in @var{s} are deleted\n\ +and not returned in the numeric array. For cell arrays each character\n\ +string element is processed and a double or complex array of the same\n\ +dimensions as @var{s} is returned.\n\ \n\ For unconvertible scalar or character string input @code{str2double} returns\n\ -a NaN. Similarly, for character array input @code{str2double} returns a NaN\n\ -for any row of @var{s} that could not be converted. For a cell array\n\ +a NaN@. Similarly, for character array input @code{str2double} returns a\n\ +NaN for any row of @var{s} that could not be converted. For a cell array,\n\ @code{str2double} returns a NaN for any element of @var{s} for which\n\ -conversion fails, which includes numeric elements.\n\ +conversion fails. Note that numeric elements in a mixed string/numeric\n\ +cell array are not strings and the conversion will fail for these elements\n\ +and return NaN.\n\ \n\ @code{str2double} can replace @code{str2num}, and it avoids the security\n\ risk of using @code{eval} on unknown data.\n\