Unable to comprehend "time" function output
조회 수: 1 (최근 30일)
이전 댓글 표시
d = caldays(8:10) + hours(1.2345)
t = time(d) % this output
Is this output returning the difference between time components of calenderDuration function or only time duration between time values in the array ? can anyone tell more about this output
댓글 수: 0
채택된 답변
Stephen23
2024년 2월 9일
편집: Stephen23
2024년 2월 9일
"Is this output returning the difference between time components of calenderDuration function or only time duration between time values in the array "
Neither, there are absolutely no differences involved.
Exactly as the TIME documentation states, it returns the time component of calendar duration objects.
In pseudo-nomenclature, if you have this CALENDARDURATION array:
99 days 12h 34m 56s789
then TIME returns the time part only (as a DURATION array):
12h 34m 56s789
댓글 수: 2
Stephen23
2024년 2월 9일
If differences were involved this would not work:
d = caldays(8) + hours(1.2345)
t = time(d)
t.Format = "hh:mm:ss.SSS"
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Dates and Time에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!