Load data from txt file
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuesta aceptada
Walter Roberson
el 20 de Oct. de 2011
fid = fopen('LECROYWS454.txt','rt');
result = textscan(fid, '%f%f', 'HeaderLines',5, 'Delimiter',',', 'CollectOutput', 1);
fclose(fid);
YourData = result{1};
clear result
Más respuestas (0)
Ver también
Categorías
Más información sobre Large Files and Big Data en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!