필터 지우기
필터 지우기

shift time data in a time table

조회 수: 20 (최근 30일)
George Pavlath
George Pavlath 2022년 7월 6일
댓글: George Pavlath 2022년 7월 6일
I have a timetible with time steps every 1e-6 seconds. The last time is 200 usec. Their is only one data column. I would like to create a second timetable from the first but offsetting the times from the first by a fixed offset. Finally, I will vertically concatenate the two timetables to create a new timetable. If TT is the timetable, I have tried:
TTnew=TT;
TTnew.Time=TTnew.Time+201e-6; % an offset of 201 usec. This gives funny results. Rather than shifting the times by 201 usec, the first time entry is 17.366 sec.
How can I offset all of the time entries in a timetable by a fixed amount?

답변 (1개)

Walter Roberson
Walter Roberson 2022년 7월 6일
TTnew.Time = TTnew.Time + seconds(201e-6)
  댓글 수: 1
George Pavlath
George Pavlath 2022년 7월 6일
Thsi worked perfectly! Thank you.

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

카테고리

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

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by