Import Labview Text file with lines of text above a two column data set

2 views (last 30 days)
Hey all,
How would I go about making the first column of the data into a vector and the second into another vector? For reference, the file format is a text file
Data recorded on Wednesday, May 18, 2022 at 16:05:59
Acquistion Time: 3.0 [sec.]
Sampling rate: 100 [samples/sec]
Channel 0 slope: 1.000 [units/V]
Channel 0 Y-Intercept: 0.000 [volts]
Channel 1 slope: 1.000 [units/V]
Channel 1 Y-Intercept: 0.000 [volts]
Comments/Notes: Lead 1
--------START OF DATA---------------------------------------------------
Signal 1_[units] Signal 2_[units]
0.324 -0.000
0.387 -0.000
0.229 -0.000
0.231 -0.000
0.184 -0.000
0.142 -0.000
0.121 -0.000
0.028 -0.000
0.133 -0.000
0.007 -0.000

Answers (1)

Mathieu NOE
Mathieu NOE on 24 May 2022
Edited: Mathieu NOE on 24 May 2022
hello
there are 10 header lines in your file (attached for double check)
code is simply :
>> data = readmatrix('Data.txt',"NumHeaderLines",10);
>> data
data =
0.3240 0
0.3870 0
0.2290 0
0.2310 0
0.1840 0
0.1420 0
0.1210 0
0.0280 0
0.1330 0
0.0070 0

Tags

Products

Community Treasure Hunt

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

Start Hunting!