Your task for tomorrow is to create a random binary (logical) vector of N elements of which M are true.
For example:
random_binary(10,4)
could result in
[1 0 0 1 1 0 0 0 1 0]
This task is related to problem 1089.
This Test suite sucks.. it does not let pass a right solution.........
The test suite does not check that y has n elements.
1313 Solvers
Sort numbers by outside digits
116 Solvers
Compute a dot product of two vectors x and y
645 Solvers
205 Solvers
1247 Solvers