채택된 답변

per isakson
per isakson 2017년 10월 10일
편집: per isakson 2017년 10월 10일

0 개 추천

datestr takes days as input. Thus, divide by 24.
>> val = 7.6;
>> datestr( val/24, 'HH:MM' )
ans =
07:36
I guessed that seven is hours, not minutes.

추가 답변 (1개)

Peter Perkins
Peter Perkins 2017년 10월 13일
편집: Peter Perkins 2017년 10월 13일

2 개 추천

This depends on what you mean by "time". Likely, the most useful thing is a duration:
>> t = hours(7.6)
t =
duration
7.6 hr
>> t.Format = 'hh:mm:ss'
t =
duration
07:36:00

카테고리

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

태그

질문:

2017년 10월 10일

편집:

2017년 10월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by