convert cell in minutes to seconds vector

1 回表示 (過去 30 日間)
Ariela Glikman
Ariela Glikman 2019 年 2 月 28 日
回答済み: StefBu 2019 年 2 月 28 日
hi,
i have the cell
time = {[3,41] [2,59] [3,12] [5,27]}
ie : [2 30] is 2.5 minutes,
and i need the time in secounds.
thanks

回答 (1 件)

StefBu
StefBu 2019 年 2 月 28 日
Hi try this:
seconds = zeros(size(time));
for i = 1:size(time,2)
seconds(i) = time{i}(1,1)*60 + time{i}(1,2);
end
Greetings Stefan

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

タグ

製品


リリース

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by