Why does %c not read whitespaces with the TEXTREAD function?
I am trying to read a file using TEXTREAD. Here is an example input file:
one two three four one two three four
I should be able to read this file using
[a, b] = textread('file', '%3c%3c%*[^\n]');
and expect the output to be:
a=[ 'one'; 'one' ] and b=[ ' tw'; ' tw'; ]
But I get
a=[ 'one'; 'one' ] and b=[ 'two'; 'two' ]
It appears that the whitespace between the 'one' and 'two' is skipped.
Best Answer