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 414848

Submitted on 7 Mar 2014 by Mehmet OZC

Correct

50Size
Leading solution size is 26.
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
 
%%
x = '01-Jan-1990';
y_correct = 6;
assert(isequal(FindMyBday(x),y_correct))

                    
2
Pass
 
%%
x = '04-Sep-1985';
y_correct = 6;
assert(isequal(FindMyBday(x),y_correct))

                    
3
Pass
 
%%
x = '29-Feb-1970';
y_correct = 11;
assert(isequal(FindMyBday(x),y_correct))

                    
4
Pass
 
%%
x = '01-Aug-2000';
y_correct = 6;
assert(isequal(FindMyBday(x),y_correct))

                    
5
Pass
 
%%
x = '26-Jun-2012';
y_correct = 6;
assert(isequal(FindMyBday(x),y_correct))

                    
6
Pass
 
%%
x = '16-Jun-1983';
y_correct = 5;
assert(isequal(FindMyBday(x),y_correct))