필터 지우기
필터 지우기

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 CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

태그

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by