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

# Solution 178746

Submitted on 18 Dec 2012 by Aurelien Queffurust

Correct

59Size
`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

```%%
[nDays,dateStr] = compute_next_birthday_milestone('12-Feb-1809');
assert(isequal(nDays,75000) && isequal(dateStr,'17-Jun-2014'))
```
```ii =
1
newdate =
661767
ii =
2
newdate =
662767
ii =
3
newdate =
663767
ii =
4
newdate =
664767
ii =
5
newdate =
665767
ii =
6
newdate =
666767
ii =
7
newdate =
667767
ii =
8
newdate =
668767
ii =
9
newdate =
669767
ii =
10
newdate =
670767
ii =
11
newdate =
671767
ii =
12
newdate =
672767
ii =
13
newdate =
673767
ii =
14
newdate =
674767
ii =
15
newdate =
675767
ii =
16
newdate =
676767
ii =
17
newdate =
677767
ii =
18
newdate =
678767
ii =
19
newdate =
679767
ii =
20
newdate =
680767
ii =
21
newdate =
681767
ii =
22
newdate =
682767
ii =
23
newdate =
683767
ii =
24
newdate =
684767
ii =
25
newdate =
685767
ii =
26
newdate =
686767
ii =
27
newdate =
687767
ii =
28
newdate =
688767
ii =
29
newdate =
689767
ii =
30
newdate =
690767
ii =
31
newdate =
691767
ii =
32
newdate =
692767
ii =
33
newdate =
693767
ii =
34
newdate =
694767
ii =
35
newdate =
695767
ii =
36
newdate =
696767
ii =
37
newdate =
697767
ii =
38
newdate =
698767
ii =
39
newdate =
699767
ii =
40
newdate =
700767
ii =
41
newdate =
701767
ii =
42
newdate =
702767
ii =
43
newdate =
703767
ii =
44
newdate =
704767
ii =
45
newdate =
705767
ii =
46
newdate =
706767
ii =
47
newdate =
707767
ii =
48
newdate =
708767
ii =
49
newdate =
709767
ii =
50
newdate =
710767
ii =
51
newdate =
711767
ii =
52
newdate =
712767
ii =
53
newdate =
713767
ii =
54
newdate =
714767
ii =
55
newdate =
715767
ii =
56
newdate =
716767
ii =
57
newdate =
717767
ii =
58
newdate =
718767
ii =
59
newdate =
719767
ii =
60
newdate =
720767
ii =
61
newdate =
721767
ii =
62
newdate =
722767
ii =
63
newdate =
723767
ii =
64
newdate =
724767
ii =
65
newdate =
725767
ii =
66
newdate =
726767
ii =
67
newdate =
727767
ii =
68
newdate =
728767
ii =
69
newdate =
729767
ii =
70
newdate =
730767
ii =
71
newdate =
731767
ii =
72
newdate =
732767
ii =
73
newdate =
733767
ii =
74
newdate =
734767
ii =
75
newdate =
735767
nDays =
75000
dateStr =
17-Jun-2014
```
2
Pass

```%%
[nDays,dateStr] = compute_next_birthday_milestone('14-Mar-1879');
assert(isequal(nDays,49000) && isequal(dateStr,'10-May-2013'))
```
```ii =
1
newdate =
687364
ii =
2
newdate =
688364
ii =
3
newdate =
689364
ii =
4
newdate =
690364
ii =
5
newdate =
691364
ii =
6
newdate =
692364
ii =
7
newdate =
693364
ii =
8
newdate =
694364
ii =
9
newdate =
695364
ii =
10
newdate =
696364
ii =
11
newdate =
697364
ii =
12
newdate =
698364
ii =
13
newdate =
699364
ii =
14
newdate =
700364
ii =
15
newdate =
701364
ii =
16
newdate =
702364
ii =
17
newdate =
703364
ii =
18
newdate =
704364
ii =
19
newdate =
705364
ii =
20
newdate =
706364
ii =
21
newdate =
707364
ii =
22
newdate =
708364
ii =
23
newdate =
709364
ii =
24
newdate =
710364
ii =
25
newdate =
711364
ii =
26
newdate =
712364
ii =
27
newdate =
713364
ii =
28
newdate =
714364
ii =
29
newdate =
715364
ii =
30
newdate =
716364
ii =
31
newdate =
717364
ii =
32
newdate =
718364
ii =
33
newdate =
719364
ii =
34
newdate =
720364
ii =
35
newdate =
721364
ii =
36
newdate =
722364
ii =
37
newdate =
723364
ii =
38
newdate =
724364
ii =
39
newdate =
725364
ii =
40
newdate =
726364
ii =
41
newdate =
727364
ii =
42
newdate =
728364
ii =
43
newdate =
729364
ii =
44
newdate =
730364
ii =
45
newdate =
731364
ii =
46
newdate =
732364
ii =
47
newdate =
733364
ii =
48
newdate =
734364
ii =
49
newdate =
735364
nDays =
49000
dateStr =
10-May-2013
```
3
Pass

```%%
[nDays,dateStr] = compute_next_birthday_milestone('17-Aug-1939');
assert(isequal(nDays,27000) && isequal(dateStr,'19-Jul-2013'))
```
```ii =
1
newdate =
709434
ii =
2
newdate =
710434
ii =
3
newdate =
711434
ii =
4
newdate =
712434
ii =
5
newdate =
713434
ii =
6
newdate =
714434
ii =
7
newdate =
715434
ii =
8
newdate =
716434
ii =
9
newdate =
717434
ii =
10
newdate =
718434
ii =
11
newdate =
719434
ii =
12
newdate =
720434
ii =
13
newdate =
721434
ii =
14
newdate =
722434
ii =
15
newdate =
723434
ii =
16
newdate =
724434
ii =
17
newdate =
725434
ii =
18
newdate =
726434
ii =
19
newdate =
727434
ii =
20
newdate =
728434
ii =
21
newdate =
729434
ii =
22
newdate =
730434
ii =
23
newdate =
731434
ii =
24
newdate =
732434
ii =
25
newdate =
733434
ii =
26
newdate =
734434
ii =
27
newdate =
735434
nDays =
27000
dateStr =
19-Jul-2013
```