フィルターのクリア

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 件のコメント
madhan ravi
madhan ravi 2019 年 2 月 28 日
time=[time{:}]
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