Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

cell of minutes and seconds

2 Ansichten (letzte 30 Tage)
Ariela Glikman
Ariela Glikman am 28 Feb. 2019
Geschlossen: MATLAB Answer Bot am 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

Antworten (1)

Stephan
Stephan am 28 Feb. 2019
Bearbeitet: Stephan am 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 Kommentare
madhan ravi
madhan ravi am 28 Feb. 2019
time=[time{:}]
Stephan
Stephan am 28 Feb. 2019
Bearbeitet: Stephan am 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.

Diese Frage ist geschlossen.

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by