Problem 2356. Simulating the selection of a state with given probabilities
39.77% Correct | 60.23% Incorrect
Last Solution submitted on Feb 28, 2023
Guillaume on 11 Jun 2014
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.
Omer on 11 Jun 2014
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 Solvers23
Return a list sorted by number of occurrences
Find common elements in matrix rows
Convert a vector into a number
More from this Author6
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!