Cody

Solution 2671238

Submitted on 9 Jul 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 = 6; rng(7); assert((round(abs(loln(N)),7) == 7.2900e-05))

a = 1 2 3 4 5 6 avga = 3.5000

Error using randi First input must be a positive scalar integer value IMAX, or two integer values [IMIN IMAX] with IMIN less than or equal to IMAX. Error in loln (line 4) V = randi(1:1e8) Error in Test1 (line 3) assert((round(abs(loln(N)),7) == 7.2900e-05))

2   Fail
N = 10; rng(1000); assert((round(abs(loln(N)),7) == 8.7600e-05))

a = 1 2 3 4 5 6 7 8 9 10 avga = 5.5000

Error using randi First input must be a positive scalar integer value IMAX, or two integer values [IMIN IMAX] with IMIN less than or equal to IMAX. Error in loln (line 4) V = randi(1:1e8) Error in Test2 (line 3) assert((round(abs(loln(N)),7) == 8.7600e-05))