Function Reference
— Built-in Function: [val, count] = sscanf (string, template, size)
— Built-in Function: [v1, v2, ..., count] = sscanf (string, template, "C")

This is like fscanf, except that the characters are taken from the string string instead of from a stream. Reaching the end of the string is treated as an end-of-file condition.

See also: fscanf scanf sprintf