Combine times series with different length by interpolation
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (2)
Guillaume
el 11 de Oct. de 2018
I would convert your tables to timetables and synchronize those using whichever time basis or time base is appropriate.
Sara Nadeau
el 11 de Oct. de 2018
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 comentarios
Peter Perkins
el 31 de Oct. de 2018
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.
Ver también
Categorías
Más información sobre Timetables en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!