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 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!