Info

此问题已关闭。 请重新打开它进行编辑或回答。

cell of minutes and seconds

2 次查看(过去 30 天)
Ariela Glikman
Ariela Glikman 2019-2-28
关闭: MATLAB Answer Bot 2021-8-20
hi,
i have cell of minutes and seconds, and i need it on minutes.
the cell is:
time= {[3,41] [2,59] [3,12] [5,27]}
ie: [2 30] is 2.5 minutes

回答(1 个)

Stephan
Stephan 2019-2-28
编辑:Stephan 2019-2-28
time= {[3,41] [2,59] [3,12] [5,27]};
time_1 = [time{:}];
mins = minutes(time_1(1,1:2:end)) + seconds(time_1(1,2:2:end))
  2 个评论
Stephan
Stephan 2019-2-28
编辑:Stephan 2019-2-28
i did not want to overwrite the original data. not sure if it is still needed. but i found the issue and corrected it. thank you madhan.

此问题已关闭。

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by