Home > freetb4matlab > strings > str2num.m

str2num

PURPOSE ^

% Convert the string (or character array) @var{s} to a number (or an

SYNOPSIS ^

function m = str2num (s)

DESCRIPTION ^

% -*- 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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sat 16-May-2009 00:04:49 by m2html © 2003