MATLAB Answers

how to handle variable time stamped long time series data?

14 views (last 30 days)
bushra raza
bushra raza on 20 Oct 2018
Commented: jonas on 23 Oct 2018
Hello! i am working on time series data of sea water levels. one station data is in zrx format, and other is in excel(xls) format. i have to find the correlation between the two data sets in Matlab. time stamps of both files are not syncronized. and i have to correlate the data on same time stamp. please guide me, should i shift my data to timetable. and then start my analysis? or how should i start it ?
thanks in advance.

  0 Comments

Sign in to comment.

Accepted Answer

jonas
jonas on 20 Oct 2018
Edited: jonas on 20 Oct 2018
  1. Load data
  2. Put data in two timetables
  3. Use synchronize
  4. Step 1-3 did not work? Upload the data.

  18 Comments

jonas
jonas on 23 Oct 2018
Sure, this should give you the difference, assuming you have two timetables TT1 and TT2.
TTdiff = TT1{:,1} - TT2{:,1};
You could also add this as a new column in your timetable:
TT1.diff = TT1{:,1} - TT2{:,1};
You can index tables in many different ways... What you need to remember is that accessing the content of a table is done through use of curly braces {}.
Actually, this is a general rule for MATLAB. Curly braces returns the content of whatever you put in whereas normal braces return the same class as you put in.
bushra raza
bushra raza on 23 Oct 2018
a great help indeed. thank full to you
can you please also guide me: how can i save this calculation with timestamp in a separate data file or so?
jonas
jonas on 23 Oct 2018
Ive never done this, but you can probably use this
T = timetable2table(TT)
writetable(T, 'file.txt')
where TT is your timetable.

Sign in to comment.

More Answers (0)

Sign in to answer this question.


Translated by