Hi, how can I get the first row elapsed time as zero please, for eg, if I have a 42x6 date vector column, I get only 41 x 1 column of time differences.
조회 수: 1 (최근 30일)
이전 댓글 표시
My code : e = etime(t2, t1)
댓글 수: 0
채택된 답변
Star Strider
2015년 9월 26일
편집: Star Strider
2015년 9월 26일
The etime function subtracts two date vectors, producing a single value (elapsed time in seconds). To get 0 as the first entry in the output, either duplicate the first entry in your date vector array, or simply concatenate a zero onto it:
e = [0; etime(t2, t1)]
추가 답변 (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!