Load data from txt file
2 次查看(过去 30 天)
显示 更早的评论
Hi to everyone! My saved output is in a txt file like this:
LECROYWS454,18357,Waveform
Segments,1,SegmentSize,249980
Segment,TrigTime,TimeSinceSegment1
#1,18-Oct-2011 15:28:23,0
Time,Ampl
-0.499955983,0.000559277
-0.499951983,0.000560498
-0.499947983,0.000562451
-0.499943983,0.000563672
...
I want load this data in a matrix with two column (time - amplitude), skipping first 5 lines. How can I do this?
0 个评论
采纳的回答
Walter Roberson
2011-10-20
fid = fopen('LECROYWS454.txt','rt');
result = textscan(fid, '%f%f', 'HeaderLines',5, 'Delimiter',',', 'CollectOutput', 1);
fclose(fid);
YourData = result{1};
clear result
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Large Files and Big Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!