Coin toss game simulation.
3 次查看(过去 30 天)
显示 更早的评论
I'm trying to create a simple coin toss simulation, the game is as follows.
a player flips a coin, if heads they score 1, if tails -1. the player can stop at any point and win the current score divided by the number of games.
I want to create some code that simulates this for say 10 coin tosses and outputs the scores at each toss in for example a vector and the separately outputs the larges score.
any help would be hugely appreciated.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!