datetime variables from a timerange

I have a timerange variable with a start time and end time. Is there a way extract those datetime values from a timerange variable?

2 件のコメント

Walter Roberson
Walter Roberson 2020 年 10 月 21 日
Do you mean a timeseries object? You can use linspace between start and end time based on number of elements
J. Alex Lee
J. Alex Lee 2020 年 10 月 22 日
Walter, timerange is a datatype used to index timetables (and maybe do other things).
i have not had luck with this either. if i recall correctly, you can't "char" a timerange right? but since presumably you create your timerange variable from 2 datetimes, just save those as their own variables first?

サインインしてコメントする。

 採用された回答

Walter Roberson
Walter Roberson 2020 年 10 月 22 日

0 投票

There are no public properties or methods to examine that information. However you can struct() the object and examine the fields "first" and "last"

1 件のコメント

JR Wong
JR Wong 2020 年 10 月 22 日
that works well enough! Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink についてさらに検索

質問済み:

2020 年 10 月 21 日

コメント済み:

2020 年 10 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by