MATLAB Function Reference
  Go to function:
    Search    Help Desk 
str2num    Examples   See Also

String to number conversion

Syntax

Description

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

The str2num function can also convert string matrices.

Examples

str2num('3.14159e0') is approximately .

To convert a string matrix:

See Also

The special characters [] and ;

hex2num, num2str, sparse, sscanf



[ Previous | Help Desk | Next ]