Problem 2356. Simulating the selection of a state with given probabilities
Solution Stats
Problem Comments
-
2 Comments
It's not clear to me what select_state is supposed to return. I would have thought it was one of the state (i.e. one of 1, 2, 3, ...) but it's not what the test suite tests for.
Returning the passed in probability with a very small deviation is enough to pass the test suit. This doesn't seem right.
Guillaume, i changed the problem output to states rather than the probability values. This way looks better i presume. Thanks for the comment. Cheers
Problem Recent Solvers21
Suggested Problems
-
Project Euler: Problem 6, Natural numbers, squares and sums.
1682 Solvers
-
8119 Solvers
-
282 Solvers
-
What is the distance from point P(x,y) to the line Ax + By + C = 0?
339 Solvers
-
Fix the last element of a cell array
875 Solvers
More from this Author6
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!