I am reading in numbers from a text file to a string. For example, consider the string below, which contains 4 integers: 99919, 99920, 100000, 99997:
>> str=' 99919 99920100000 99997'
Each takes up exactly 6 characters in the string, with leading zeros shown as spaces. I am trying to use "textscan" to read these numbers one-by-one,
>> t = textscanf(str,'%6d')>> celldisp(t)
but it is not working as expected.
Best Answer