duration to number(double)
조회 수: 748 (최근 30일)
이전 댓글 표시
Juan Camilo Gómez Cadavid
2022년 2월 28일
댓글: Juan Camilo Gómez Cadavid
2022년 10월 17일
Any workaround to convert duration (seconds, hours, etc...) to a numeric value (double)
댓글 수: 0
채택된 답변
Steven Lord
2022년 2월 28일
Use seconds, hours, etc. depending on how you want the duration array to be converted to a number.
d = duration(1, 2, 3)
s = seconds(d)
m = minutes(d)
h = hours(d)
댓글 수: 5
Walter Roberson
2022년 10월 17일
When you apply minutes() or seconds() or days() or hours() to a double, then a duration object is created.
When you apply those functions to duration objects, double values are created.
For example
hours(days(7.2))
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!