If you want to consider "
as whitespace, then you should not use %q
which needs the double quotes to identify the full string and cannot find them if you consider them whitespace:
fid = fopen('test.txt');
fmt = '%4u%2u%2u%2u%2u%2u%u%u%s%s%f%f%f%u';
out = textscan(fid,fmt,'Delimiter',',','Whitespace','"')
fclose(fid)
Alternatively I was suggesting in the comments to use:
fmt = '"%4u%2u%2u%2u%2u%2u" "%u" "%u"%q%q"%f" "%f" "%f" "%u"';
out = textscan(fid,fmt,'Delimiter',',')
note how I space " "
, otherwise textscan()
cannot recognize when fields really end.
However, I would personally might go for explicit date conversion to serial date
fmt = '%s%u%u%s%s%f%f%f%u';
out = textscan(fid,fmt,'Delimiter',',','Whitespace','"')
out{1} = datenum(out{1},'yyyymmddHHMMSS');