How do I get only the HR out of this .csv
1 view (last 30 days)
Show older comments
Hi
I am trying read this file into Matlab and plot the Heartrate.
I am pretty confused what type of command I should use
Thanks for your Help!
Tristan![Unbenannt.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/261305/Unbenannt.png)
![Unbenannt.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/261305/Unbenannt.png)
0 Comments
Answers (1)
Meg Noah
on 12 Jan 2020
If you post the file, or at least the first 20 lines or so, it would be easier to say which command is best to use. Generally, the command I would use is readtable, but I might edit the first lines to get a good header line before reading it. This is a good way to get an indication about how well readtable can pars your data:
opts = detectImportOptions('myCsvfile1.csv');
disp(opts)
For a csv with a single header line:
% read everything into a table
t1 = readtable('myCsvfile1.csv');
% select the data you want
t1 = t1.Var3;
For a csv file with an extra header line before the variable name header:
t2 = readtable('myCsvfile2.csv', 'HeaderLines',1);
t2 = t2.Var3;
0 Comments
See Also
Categories
Find more on Language Fundamentals in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!