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"

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

질문:

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