How can I only select table data from a text file.

1 次查看(过去 30 天)
Matlab users,
I have a question regarding selecting certain data from a text file. I only need the second column from the table and all the rows. I used importdata to import the text file. I do not need the text above the table. how can I neglect it and only focus on the table.
CprPuckView (V1.14)
Log start = 10/13/2021 8:30:25 AM
Fs = 250Hz
S/N = 0000000135
PUCK Firmware Version = 1.0
PUCK Calibration time = 8/29/2005 4:21:53 PM
Average values = OFF
Accelerometer (0.001 g) Force-sensor (grams) Depth (0.01 mm) EVENTS
986 120 0
981 -60 0
984 -60 0
986 -70 0
993 -70 0
997 -70 0
1000 -70 0
1005 -70 0
1005 -70 0
1000 -70 0
994 -60 0
992 -60 0
991 -80 0
992 -80 0
990 -60 0
994 -60 0
995 -60 0
995 -60 0
991 -60 0
986 -60 0
981 -50 0
976 -50 0

回答(1 个)

Chunru
Chunru 2021-10-17
a=readmatrix('G2_A.txt', 'NumHeaderLines',8)
a = 3238×3
986 120 0 981 -60 0 984 -60 0 986 -70 0 993 -70 0 997 -70 0 1000 -70 0 1005 -70 0 1005 -70 0 1000 -70 0

类别

Help CenterFile Exchange 中查找有关 Data Import and Analysis 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by