Cody

Problem 44277. Given n, create n random numbers such that their standard deviation is also n.

Solution 2013856

Submitted on 11 Nov 2019
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
x = 10; assert(length(randpro(x))==10) assert(std(randpro(x))>9) assert(std(randpro(x))<11)

y = 1 11 21 31 41 51 61 71 81 91 y = 1 11 21 31 41 51 61 71 81 91 y = 1 11 21 31 41 51 61 71 81 91

Assertion failed.

2   Fail
x = 17; assert(length(randpro(x))==17) assert(std(randpro(x))>16) assert(std(randpro(x))<18)

y = 1 18 35 52 69 86 103 120 137 154 171 188 205 222 239 256 273 y = 1 18 35 52 69 86 103 120 137 154 171 188 205 222 239 256 273 y = 1 18 35 52 69 86 103 120 137 154 171 188 205 222 239 256 273

Assertion failed.

Suggested Problems

More from this Author100

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!