You can use the following sscanf
format to parse the string "n1 n2 r = 20" in MATLAB:
main.m67 chars3 lines
This code will parse the string "n1 n2 r = 20" and store "n1" and "n2" as strings, and "20" as an integer in the variables n1
, n2
, and r
respectively.
gistlibby LogSnag