Cody

Solution 2123027

Submitted on 9 Feb 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
n = 10; m = 4; y = random_binary(n,m); assert(islogical(y) && isequal(sum(y),m) && abs(std(diff(y)>0)-0.45)<0.2)

s = [] ans = 10

Output argument "y" (and maybe others) not assigned during call to "random_binary". Error in Test1 (line 3) y = random_binary(n,m);

2   Fail
n = 1000; m = 500; y = random_binary(n,m); assert(islogical(y) && isequal(sum(y),m) && abs(std(diff(y)>0)-0.45)<0.05)

s = [] ans = 1000

Output argument "y" (and maybe others) not assigned during call to "random_binary". Error in Test2 (line 3) y = random_binary(n,m);

3   Fail
n = 500; m = 20; y = random_binary(n,m); assert(islogical(y) && isequal(sum(y),m) && abs(std(diff(y)>0)-0.18)<0.05)

s = [] ans = 500

Output argument "y" (and maybe others) not assigned during call to "random_binary". Error in Test3 (line 3) y = random_binary(n,m);