unable to read time stamps from a csv file, unable to read the csv file in matlab

9 次查看(过去 30 天)
Hai all,
This is with regards to the csv data which i gathered from the raspberry pie. The notepad file which consists of 2500 rows and 8 columns, is difficult to be read in excel as well as in matlab due to some reasons,
  1. the file consists of timestamps (eg: 2020-02-05 15:21:51.659353) in this format which is(DD-MM-YYY HH:MM:SS:FF). once i convert this to excel file, the microseconds are trimmed or neglected giving me only HH:MM:SS(resulting in incorrect result when plotting).Since the microseconds are really vital in finding the sampling rate, using excel to read the csv data is turning out to be less useful.
  2. i alternatively tried reading the csv data in matlab wth the command 'readtable' which was found to be useful (read all the data including the time stamps), but unfortunately, i was unable to carryout other commands since it is not an array function. i even tried to convert the file using 'table2array' but turned out to show errors.
  3. i have tried the lab2mat function to convert the file to .tom function which also lead to errors.
I request any of you who are expert in matlab to solve this issue for me as it is urgent for my thesis work and i am stuck in the middle. i am attaching my acquired csv data alonw with the message. please go through.
  1 个评论
Shebin Rasheed
Shebin Rasheed 2020-8-10
my project is basically a motion measurement in a 2D narrow wave tank. the scale model which is a floating ball valve were the accelerometer is clamped to the valve to read its heave motion. The scale model is clamped to a T shaped wooden frame for stability. the x-direction of the accelerometer reads the heave motion which is obtained through the raspberry pi. This data is saved in the form of a csv file. what the aim is to plot the data for acceleration vs time, acceleration vs frequency as well as velocity vs time and displacement vs time. This graph is then compared with the graph obtained by using a filter especially kalman filter (i have got no idea how a kalman filter can be applied in this). I am not that expert in matlab, just a beginner, please, if someone could sort this out, i would really be grateful, please guide me thorugh.

请先登录,再进行评论。

采纳的回答

Cris LaPierre
Cris LaPierre 2020-8-4
编辑:Cris LaPierre 2020-8-4
If you got it working with readtable, use that. You just need to learn how to access the data in a table. For that, see this documentation page.
  13 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Time Series Events 的更多信息

产品


版本

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by