Get specific data from text file
古いコメントを表示
I have a text file containing collected raw data. I am only interested in the three columns . How can I get only these three columns in a matrix. I tried
data= importdata('testfile.txt');
as a result I have the requested matrix data, textdata and colheaders. My question is how can I get only the data and omit the txtdata and colheaders.
There are five rows before starting collecting data.Like this, for example :
Interval= 0.001 s
ExcelDateTime= 4.1286505976192129e+004 2013-1-12 12:08:36.343
TimeFormat= StartOfBlock
ChannelTitle= XXXXX XXXXX
Range= 5.000 mV 5.000 mV
after that there are there three columns(numbers) that I want to extract them. So I do not want the upper mentioned five lines to be included.
1 件のコメント
per isakson
2013 年 4 月 3 日
編集済み: per isakson
2013 年 4 月 3 日
see textscan, ... '%*f' skips a column
回答 (1 件)
Walter Roberson
2013 年 4 月 4 日
0 投票
Use textscan() with HeaderLines set to 5 and format set to '%f%f%f'
1 件のコメント
カテゴリ
ヘルプ センター および File Exchange で Text Data Preparation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!