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.
Mysterious digits operation (easy)
Calculate the hypotenuse of a right triangle without using ^ and sqrt ()
Number of Even Elements in Fibonacci Sequence
5th Time's a Charm
Net Present Value of a Stream of Cash Flows
Write c^3 as sum of two squares a^2+b^2
Lunar Arithmetic (Addition)
Determine if input is a valid AHP evaluation matrix
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office