Filing/interpolation of irregular sample time series multivariate data

Hello,
I have an irregular time series sample data with multiple variables, and I would like to fill in the gaps (filling or interpolation) to get daily data for all the variables at one interpolation. The data is a attached.
Can anyone be of help, please?
Ed

 Accepted Answer

Try this:
T1 = readtable('Edward Bam Eddata.txt');
T2 = table2timetable(T1, 'RowTimes','TimeStamp');
T3 = retime(T2, 'daily','linear'); % Desired Result
See the documentation on the retime function for additional options for the interpolation.
Avoiding the intermediate steps using readtimetable is also an option. I chose to do the intermediate steps so that I could see them, since I was unfamiliar with your file.

4 Comments

Hello Star Strider, I am very grateful. It works perfectly when I used the readtimetable option.
I had this when I used the retime. Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the VariableDescriptions property.
Set 'PreserveVariableNames' to true to use the original column headers as table variable names.
Thank you.
As always, my pleasure!
Use the PreserveVariableNames option if you do not want to use them in your code, and refer to the columns by the column indices or the names the function creates for them instead. I let readtable or readtimetable change the names (slightly) since for me that the timetable variables are easier to work with.

Sign in to comment.

More Answers (1)

firstly i am not an exxpert
but simple help for you is :cftool matlab
it has multiple variable regression

1 Comment

Hello shadman khan , Thanks for the attempt...the second answer works perfectly...you wana try it?

Sign in to comment.

Asked:

B
B
on 7 Dec 2019

Commented:

on 7 Dec 2019

Community Treasure Hunt

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

Start Hunting!