MATLAB Function Reference Previous page   Next Page
str2num

Convert string to number

Syntax

Description

x = str2num('str') converts the string str, which is an ASCII character representation of a numeric value, to numeric representation. The string can contain

The str2num function can also convert string matrices.

Examples

str2num('3.14159e0') is approximately pi.

To convert a string matrix,

See Also

num2str, hex2num, sscanf, sparse, special characters


Previous page  str2mat strcat Next page

© 1994-2005 The MathWorks, Inc.