Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

cell of minutes and seconds

2 vues (au cours des 30 derniers jours)
Ariela Glikman
Ariela Glikman le 28 Fév 2019
Clôturé : MATLAB Answer Bot le 20 Août 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

Réponses (1)

Stephan
Stephan le 28 Fév 2019
Modifié(e) : Stephan le 28 Fév 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 commentaires
madhan ravi
madhan ravi le 28 Fév 2019
time=[time{:}]
Stephan
Stephan le 28 Fév 2019
Modifié(e) : Stephan le 28 Fév 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.

Cette question est clôturée.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by