This enhancement has been incorporated in Release 2010b (R2010b). For previous product releases, read below for any possible workarounds:
Whitespace is the default delimiter property when reading strings. When 'whitespace' is not set, strings are parsed between any 'whitespace' characters. When 'whitespace' is set to somethign more specific, like '\n', strings are only parsed between the instances of '\n.'
Note in the below examples how the string format specifier behaves differently:
test1 = textscan('string1 string2', '%s', 1)
test1 = textscan('string1 string2', '%s', 1, 'whitespace','')
test1 = textscan('string1 string2', '%s', 1, 'whitespace', '', 'delimiter', ' ')
Best Answer