Date is element of some period in MATLAB

1 visualización (últimos 30 días)
Nejc
Nejc el 4 de Abr. de 2013
Hi
I have a question that bother me. If I have a date, lets say 10.2012, how can i check he is element of period beetwen 14.10.12 and 1.1.2013.
Thank you in advance
Nejc

Respuesta aceptada

Walter Roberson
Walter Roberson el 4 de Abr. de 2013
pstart = datenum('14.10.2012', 'dd.mm.yyyy');
pend = datenum('1.1.2013', 'dd.mm.yyyy');
testdate = datenum('5.10.2012', 'dd.mm.yyyy');
if testdate >= pstart & testdate < pend
disp('in testing range')
end

Más respuestas (0)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by