MATLAB: How to read .sts file in matlab

dlmreadfilreadfopenfor loopimportdatatextscanxlswrite

hi..i have .sts file(45000). i need to read this files in a loop and append them into an excel file. in each .sts file,it contains data like below,
SAMPLE_20130606_0006 0 +6.470299E+0 +4.009076E+0 +1.699308E+1 +1.095633E+0
SAMPLE_20130606_0016 0 +6.938715E+0 +2.954977E+0 +1.125970E+1 +1.396087E+0
SAMPLE_20130606_0026 0 +8.297382E+0 +4.155266E+0 +2.333013E+1 +1.611527E+0
SAMPLE_20130606_0036 0 +8.837934E+0 +5.234266E+0 +1.352240E+1 +1.407429E+0
SAMPLE_20130606_0046 0 +8.098710E+0 +3.642447E+0 +1.205176E+1 +1.683126E+0
how to read this file in a loop and save in excel format?

Best Answer

xlswrite() for the file writing.
When you read the data, do you want all fields (including the text line), or do you only want the numbers? Perhaps only the last 4 numbers?
If you want everything, just broken out into fields, the consider using fileread() to read the file, and regexp() with 'split' option to break it into fields.