필터 지우기
필터 지우기

Combine times series with different length by interpolation

조회 수: 6 (최근 30일)
Richard Vergin
Richard Vergin 2018년 10월 11일
댓글: Peter Perkins 2018년 10월 31일
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

답변 (2개)

Guillaume
Guillaume 2018년 10월 11일
I would convert your tables to timetables and synchronize those using whichever time basis or time base is appropriate.
  댓글 수: 1
Richard Vergin
Richard Vergin 2018년 10월 18일
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

댓글을 달려면 로그인하십시오.


Sara Nadeau
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
Richard Vergin
Richard Vergin 2018년 10월 18일
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 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 CenterFile Exchange에서 Calendar에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by