Basically I'm creating a script to tackle the following question:
And so far the script I have is:
The plan is to add 1 to the 'win' counter every time x=100 is reached, and add 1 to the 'loss' counter every time x=0 is hit. The s=1000 is how many times I want the loop to run, so by the end of it I will have a certain number and wins and a certain number of losses, which together will add to 1000.
It's fustrating as I've tried everything I can think of to get this working (like putting s=s+1 at various places within the loop etc) but don't know enough about MATLAB to know how to complete this script.
The gist of it is: I want to run this script so that it will give me a number of wins and a number of losses after 1000 runs through.
Thanks in advance
Don't say we didn't warn you...