Combine times series with different length by interpolation

9 visualizaciones (últimos 30 días)
Richard Vergin
Richard Vergin el 11 de Oct. de 2018
Comentada: Peter Perkins el 31 de Oct. de 2018
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

Respuestas (2)

Guillaume
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.
  1 comentario
Richard Vergin
Richard Vergin el 18 de Oct. de 2018
Hey,
I synchronized them and now have a row of flights. But unfortunately the toolboxes for machine learning are not compatible with time series. Is there a possibility to transfer the time series to an array afterwards?
Best Richard

Iniciar sesión para comentar.


Sara Nadeau
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
Richard Vergin
Richard Vergin el 18 de Oct. de 2018
Not sure if I did it right but unfortunately its not working. I created a timetable with the time column in format seconds and the time table is not recognized from the Simulink Data Inspector. Alltough it is in my active workspace, there is no file I could select to import. Seems like I can not import timetables to this tool, doesn't matter if the time column is in 'ss' or in 'yyyy:MM:dd-HH:mm:ss'. The tool does only recognize time series but I don't know how to form a proper time series out of a timetable, table or array...
Is there any other idea?
Thanks and best,
Richard
Peter Perkins
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.

Iniciar sesión para comentar.

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!

Translated by