Cody

# Problem 43610. nanoseconds passed today

Solution 2909446

Submitted on 4 Sep 2020
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   Fail
x = '24-Oct-2016 20:26:28'; y_correct = 73587999999895.69; assert(abs(nanosecondsPassedToday(x)-y_correct)<0.05)

Error using assert The condition input argument must be a scalar logical. Error in Test1 (line 3) assert(abs(nanosecondsPassedToday(x)-y_correct)<0.05)

2   Fail
x = '24-Oct-2016 20:29:48'; y_correct = 73788000001385.8; assert(abs(nanosecondsPassedToday(x)-y_correct)<0.05)

Error using assert The condition input argument must be a scalar logical. Error in Test2 (line 3) assert(abs(nanosecondsPassedToday(x)-y_correct)<0.05)

3   Fail
x = '31-Oct-2016 13:19:42'; y_correct = 47982000002637.5; assert(abs(nanosecondsPassedToday(x)-y_correct)<0.05)

Error using assert The condition input argument must be a scalar logical. Error in Test3 (line 3) assert(abs(nanosecondsPassedToday(x)-y_correct)<0.05)

4   Fail
x = '04-Jan-1972 07:24:17'; y_correct = 26656999999657.3; assert(abs(nanosecondsPassedToday(x)-y_correct)<0.05)

Error using assert The condition input argument must be a scalar logical. Error in Test4 (line 3) assert(abs(nanosecondsPassedToday(x)-y_correct)<0.05)

### Community Treasure Hunt

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

Start Hunting!