extract start and end of a timerange

3 visualizaciones (últimos 30 días)
Andy
Andy el 13 de Mzo. de 2018
Editada: Bela Burkert el 1 de Oct. de 2024
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

Respuesta aceptada

Peter Perkins
Peter Perkins el 15 de Mzo. de 2018
Andrei, you can't currently do that. You'd have to keep around the original endpoint values and create a new timerange.
  1 comentario
Bela Burkert
Bela Burkert el 21 de Jun. de 2024
Editada: Bela Burkert el 1 de Oct. de 2024
You can call
struct(timerange)
to get begin and end of that intervall with which you can generate new timeranges.
(Found at: Answer)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Tables en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by