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

Learn moreOpportunities for recent engineering grads.

Apply TodayCorrect

18Size

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

1 player likes this solution

Test

Code Input and Output

1

Pass

%% test 1 h = 20; m=5; n=3; y_correct = 9; assert(isequal(catdays(h,m,n),y_correct))

2

Pass

%% test 2 h = 15; m=6; n=1; y_correct = 3; assert(isequal(catdays(h,m,n),y_correct))

3

Pass

%% test 3 h = 25; m=6; n=5; y_correct = 21; assert(isequal(catdays(h,m,n),y_correct))

4

Pass

%% test 4 h = 22; m=6; n=5; y_correct = 18; assert(isequal(catdays(h,m,n),y_correct))

5

Pass

%% test 5 h = 31; m=8; n=5; y_correct = 9; assert(isequal(catdays(h,m,n),y_correct))