% -*- texinfo -*- % @deftypefn {Function File} {} str2num (@var{s}) % Convert the string (or character array) @var{s} to a number (or an % array). Examples: % % @example % @group % str2num('3.141596') % @result{} 3.141596 % % str2num(['1, 2, 3'; '4, 5, 6']); % @result{} ans = % 1 2 3 % 4 5 6 % @end group % @end example % % @strong{Caution:} As @code{str2num} uses the @code{eval} function % to do the conversion, @code{str2num} will execute any code contained % in the string @var{s}. Use @code{str2double} instead if you want to % avoid the use of @code{eval}. % @seealso{str2double, eval} % @end deftypefn