Borrar filtros
Borrar filtros

calculating elapsed and remaining time between times.

5 visualizaciones (últimos 30 días)
siki
siki el 6 de Dic. de 2016
Editada: siki el 6 de Dic. de 2016
t1={'2011-10-01 11:12:00'}; \\ initial value of loop
t2={'2012-03-31 23:09:00'}; \\ end value of loop
t11=datenum(t1(:));
t22=datenum(t2(:));
intrvl=datenum(0,0,0,0,1,0); \\ loop interval in minutes.
ff=datenum(starttime(:)); \\ startime: <78678x1 cell> in {2016-12-06 5:51:10} format
gg=datenum(stoptime(:)); \\ stoptime: <78678x1 cell> in {2016-12-06 5:51:10} format
for t=t11:intrvl:t22;
if(t > ff(loop-for-starttime) && t < gg(loop-for-stoptime))
body
end
end
My task is to check each value of loop ( starting from 2001-10-01 11:12:00 to 2012-03-31 23:09:00) if it is greater than starttime and less than stoptime and store searched values in a variable. if a condition is accepted it should calculate estimated time and remaining time for each searched values.
estimated time = etime(starttime,t)
remaining time= etime(stoptime,t)
kindly help.

Respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by