extract start and end of a timerange

조회 수: 11 (최근 30일)
Andy
Andy 2018년 3월 13일
편집: Bela Burkert 2024년 10월 1일
Working with timerange objects is great! One can keep a table in one piece and operate on subscripts of that table with a set of timeranges.
However ... part of that workflow is to glue two adjacent timeranges together, which means extracting the start/end datetimes of a timerange, or implementing operations such as:
TR_AB = timerange(TR_A, TR_B); // which would take start of A, end of B and generate the AB timerange.
How can one achieve this?
Thanks

채택된 답변

Peter Perkins
Peter Perkins 2018년 3월 15일
Andrei, you can't currently do that. You'd have to keep around the original endpoint values and create a new timerange.
  댓글 수: 1
Bela Burkert
Bela Burkert 2024년 6월 21일
편집: Bela Burkert 2024년 10월 1일
You can call
struct(timerange)
to get begin and end of that intervall with which you can generate new timeranges.
(Found at: Answer)

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

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by