str2num
str2num (str)
The str2num function returns a number represented by the string expression str.
Details
str2num returns NaN if str does not contain the text for a number.
str2num skips leading spaces and tabs and then reads up to the first non-numeric character.
See Also
sscanf for more complex parsing jobs.