Does in-equality operators work in comparison of two time format?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi all, I am wondering does in-equality operators such as <= >= works if I want to compare two time format? if not is there any solution for that?
my problem is that I have time threshold , say upp_lim= 21:43:12 and low_lim=21:44:12 and I have a sample_time time_e_rad(j,:)= 21:45:53 , which I want to check if it is in the range of Upp_lim and low_lim
here is my code:
if((datenum(time_e_rad(j,:)<datenum(upp_lim))) && (datenum(time_e_rad(j,:)>=datenum(low_lim))))
but it gives me error.
any idea is appreciated .
0 comentarios
Respuesta aceptada
Iain
el 25 de Jun. de 2013
You have your brackets in the wrong places.
(datenum(time_e_rad(j,:))< datenum(upp_lim)) && (datenum(time_e_rad(j,:)) >= datenum(upp_lim))
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Get Started with MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!