Join TSR now and get all your revision questions answeredSign up now
    • Thread Starter

    lo chaps,

    Basically I'm creating a script to tackle the following question:
    Name:  GamblerMan.jpg
Views: 67
Size:  161.7 KB

    And so far the script I have is:
    Name:  the100pundman.jpg
Views: 130
Size:  246.5 KB

    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
Should MenACWY vaccination be compulsory at uni?

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Quick reply
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.