Info

This question is closed. Reopen it to edit or answer.

cell of minutes and seconds

1 view (last 30 days)
Ariela Glikman
Ariela Glikman on 28 Feb 2019
Closed: MATLAB Answer Bot on 20 Aug 2021
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

Answers (1)

Stephan
Stephan on 28 Feb 2019
Edited: Stephan on 28 Feb 2019
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 Comments
Stephan
Stephan on 28 Feb 2019
Edited: Stephan on 28 Feb 2019
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.

This question is closed.

Products

Community Treasure Hunt

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

Start Hunting!