Test  Status  Code Input and Output 

1  Pass 
n = 1;
y_correct = 0.00;
assert(abs(birthday_prob(n)y_correct) <= 0.015)
y =
0

2  Pass 
n = 366;
y_correct = 1.00;
assert(abs(birthday_prob(n)y_correct) <= 0.015)

3  Pass 
n = 0;
y_correct = 0.00;
assert(abs(birthday_prob(n)y_correct) <= 0.015)
y =
0

4  Pass 
n = 23;
y_correct = 0.5073;
assert(abs(birthday_prob(n)y_correct) <= 0.015)
y =
0.5073

5  Pass 
n = 50;
y_correct = 0.9704;
assert(abs(birthday_prob(n)y_correct) <= 0.015)
y =
0.9704

6  Pass 
n = 100;
y_correct = 1.0000;
assert(abs(birthday_prob(n)y_correct) <= 0.015)
y =
1.0000

7  Pass 
n = 10
y_correct = 0.1169;
assert(abs(birthday_prob(n)y_correct) <= 0.015)
n =
10
y =
0.1169

8  Pass 
n = 13
y_correct = 0.1944;
assert(abs(birthday_prob(n)y_correct) <= 0.015)
n =
13
y =
0.1944

9  Pass 
n = 2;
y_correct = 1/365;
assert(abs(birthday_prob(n)y_correct) <= 0.015)
y =
0.0027

Select every other element of a vector
19105 Solvers
Get the length of a given vector
2801 Solvers
Remove from a 2D matrix all the rows that contain at least one element less than or equal to 4
132 Solvers
400 Solvers
1932 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!