Problem 44676. Mean = Standard Deviation
Solution Stats
Problem Comments
-
4 Comments
zeros(x,1) is not an acceptable solution. A new assert line added and all solutions are rescored
I was wondering what the one line command was to do this when I saw the scores as low as they were!! Those were before the all(y>0) condition was added.
haha! I was discussed this one with binbin yesterday, he said this one was ill-conditioned, sooner or later will be fixed. We submit a solution anyway, sort of for fun. hope you don't mind it. But if really do that can be tricky indeed. good problem.
I don't agree, bainhome, since all non-negative means m can be represented by sets with k/2 zeros and k/2 2*m numbers for any even k, which would render an infinite number of "ill-conditioned" sets for all m. For mean and std 1: [0 2], [0 0 2 2], [0 0 0 2 2 2], [0 0 0 0 2 2 2 2], ... .For mean and std 2: [0 4], [0 0 4 4], [0 0 0 4 4 4], [0 0 0 0 4 4 4 4], ... And for mean and std 3: [0 6], [0 0 6 6], [0 0 0 6 6 6], [0 0 0 0 6 6 6 6], ... In fact , m=0 is just a particular case.
PS: This is not considered a solution for this problem currently since it doesn't allow using zeros.
Problem Recent Solvers7
Suggested Problems
-
Find the sum of all the numbers of the input vector
41527 Solvers
-
1013 Solvers
-
Find nearest prime number less than input number
458 Solvers
-
3220 Solvers
-
Given n, create n random numbers such that their standard deviation is also n.
59 Solvers
More from this Author92
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!