Combine times series with different length by interpolation
8 次查看(过去 30 天)
显示 更早的评论
Hey Community,
I have the following problem: in order to use the machine learning toolbox, I want to create a single table which contains the measurements of the hydraulic system pressure from 7 flights. Since those flights vary in their length, the number of rows of the tables from each flight varies as well.
In order to compare the flights, I want to "manipulate" the data and bring all flights to the same length without loosing the trend and rashes in the data. I think I need to interpolate my flights by their time (so x-axis) but I only found the option to interpolate the values itsself and not the timestamp.
Is there a possibility and if so, could some hero provide me with help/information/examples?
Thanks and best, Richard
0 个评论
回答(2 个)
Guillaume
2018-10-11
I would convert your tables to timetables and synchronize those using whichever time basis or time base is appropriate.
Sara Nadeau
2018-10-11
If you have Simulink, the Simulation Data Inspector has a robust comparison algorithm that can handle this for you. This topic explains the algorithm: How the Simulation Data Inspector Compares Data. If your data isn't coming from a simulation, you can import it into the Simulation Data Inspector: View Data from the Workspace or a File.
I hope this helps! The Simulation Data Inspector also has a programmatic interface you can use to harness the comparison algorithm. Inspect and Compare Data Programmatically
7 个评论
Peter Perkins
2018-10-31
Richard, you said two things that make me thing you are creating the wrong kind of thing:
1) "it says its a '1x1 timetable timeseries'" - that's can't be what it says, or if it does, it can't be what you intended. Perhaps you could show a short example of what you are creating and how you are creating it.
2) I think Sara was saying that the row times vector has to be a duration, but "doesn't matter if the time column is in 'ss' or in 'yyyy:MM:dd-HH:mm:ss'" makes me think you are changing the display format of a timetable that has datetime row times. Perhaps if you converted those to duration using something like
tt.Time = tt.Time - tt.Time(1)
Sara linked to an old post that did the analogous thing using datenums; I recommend that you stick with datetime/duration if possible.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Timetables 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!