Extracting a column of data from a time series

조회 수: 174 (최근 30일)
J
J 2012년 12월 2일
댓글: Amit Tiwari 2021년 3월 25일
Does anybody have any ideas as to how to split up the time and variable1 columns of a time series so that the variable1 data can be handled independently of the time?
I have created the two time series so that I could use the resample function to make sure the data in time series 1 is taken at the same time as the data in time series 2.
If it is not possible to extract just the variable1 column, does anyone know how to interpolate a column of data so that it contains measurements at the same times as another set of data, where the time is not evenly sampled and the data consist of a very high number of measurements?
One final query: does anybody know whether it is possible to find the gradient of a timeseries?
  댓글 수: 1
José-Luis
José-Luis 2012년 12월 2일
편집: José-Luis 2012년 12월 2일
doc diff -> gradient
doc interp1 -> resample

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

답변 (1개)

Kurt Stewart
Kurt Stewart 2018년 6월 18일
If you made a time series named 'position' for instance you can extract the data by doing: position_vector=position.Data;
  댓글 수: 3
Kurt Stewart
Kurt Stewart 2019년 4월 25일
Position1=position.Data(:,1)
Position2=position.Data(:,2)
Amit Tiwari
Amit Tiwari 2021년 3월 25일
In continuation with Kurt Stewart's answer. If you want the time as a separate column, use
time = position.Time;

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

카테고리

Help CenterFile Exchange에서 Time Series에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by