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

1 view (last 30 days)
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

Answers (1)

Chunru
Chunru on 17 Oct 2021
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

Categories

Find more on Data Import and Analysis in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!