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 =
'14-Nov-2020 00:59:56'
ans =
'14-Nov-2020 01:00:00'
mmss_dec =
6.332993507385254e-08
|
895 Solvers
37 Solvers
Back to basics 18 - justification
176 Solvers
How long is the longest prime diagonal?
338 Solvers
188 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!