Combine times series with different length by interpolation
조회 수: 9 (최근 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!