Cody

Solution 587608

Submitted on 24 Feb 2015 by goc3
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%% format long format compact datestr(now) x=Top_of_Hour; y=now; datestr(y) mmss_dec=rem(y*24,1) % hh:59:59 is 0.99972 Pass=0; if mmss_dec<2/3600,Pass=1;end % 2 second threshold assert(Pass==1,sprintf('%s',datestr(y)))

ans = 24-Feb-2015 16:00:01 ans = 24-Feb-2015 16:00:01 mmss_dec = 5.225986242294312e-04 ans = 24-Feb-2015 16:00:01 mmss_dec = 5.230717360973358e-04