MATLAB: Reading numeric values from complex text files

MATLABtext filetextscan

I know this question has been asked too many times before, but I'm attempting to read numeric values from a text file that has the following format:
2.00000000000000e+001 (-2.58645139980833e+001dB,-3.39749468897168e+001°)
(This format comes from LTspiceIV AC analysis, edit: see attached .txt for example file). I have tried using different functions to read this (dlmread, fscanf, textscan) but with no success. The method I tried was to use multiple delimiters e.g.
{'\t','dB','°','(',')',','}
textscan(filename,'%f %f %f','HeaderLines',1,'Delimiter',{'\t','\n','dB','°','(',')',','});
and also grouped e.g.
textscan(filename,'%f %f %f','HeaderLines',1,'Delimiter',{'\t(','dB,','°)'});
and also with a format specifier including the whole line make-up in fscanf e.g.
'%f\t(%fdB,%f°)'
I also need to skip 1 header row. Where am I going wrong?

Best Answer

Hi Ben,
I found this worked. (of course I used a string and not a file id, but it works the same)
textscan(fid,'%f(%fdB%f°)','Delimiter',{'\t',','},'HeaderLines',1)
Good Luck,
Jeremy