Your textscan is not consistent with the lines you posted:
textscan(fid,'%s %s %*f %*s %*f
For:
s s s f f f
19.10.09 09:00:16 BASF 30 31 etc...
Should be
data = textscan(fid, ['%s%s%s%*f' repmat('%f',1,n)],HeaderLines,2,'CollectOutput',1);
where n is the number of prices except the first one which is skipped.
No need to specify delimiter and line end (see default behaviour)
EDIT
Even better would be:
fmt = ['%17c%s%*f' repmat('%f',1,40) '%*[^\n]'];
opt = {'HeaderLines',2,'CollectOutput',1};
data = textscan(fid,fmt,opt{:});
dates = datenum(data{1},'dd.mm.yy HH:MM:SS')
Best Answer