Does in-equality operators work in comparison of two time format?
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Iain
2013-6-25
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 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!