Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 125819

Submitted on 9 Aug 2012 by yuval tr

Correct

24Size
Leading solution size is 12.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
x1 = '15-jan-2000';
x2 = '24-may-2012';
y_correct = 4513;
assert(isequal(countDays(x1,x2),y_correct))

                    
2
Pass
 
%%
x1 = '15-jan-1000';
x2 = '24-may-2012';
y_correct =  369755;
assert(isequal(countDays(x1,x2),y_correct))

                    
3
Pass
 
%%
x1 = '24-may-2013';
x2 = '24-may-2012';
y_correct =  365;
assert(isequal(countDays(x1,x2),y_correct))