# Thread: Matlab lottery question help

1. ## Matlab lottery question help

hey there

i am currently a student in a univeristy in UK and one of my modules is matlab which i find a bit hard to understand so any help is apprecitated, i have been given an assignment to handle today, and i need help with it, its a lottery example the question is as follows :

Write a function that simulates the national lottery

Assume that you buy a lifetime subscription to the lottery i.e. your numbers stay the same and you play the lottery once a week (calculate the approximate value of the subscription). Assume that:
Matching 6 numbers - £1,000,000
Match 5 - £1000
Match 4 - £50
Match 3 - £10

After seeing results do you think it is statistically wise to play the lottery
(Hint: Use the random number generator to create the lottery numbers each week.)

2. Originally Posted by jammyxxx
hey there

i am currently a student in a univeristy in UK and one of my modules is matlab which i find a bit hard to understand so any help is apprecitated, i have been given an assignment to handle today, and i need help with it, its a lottery example the question is as follows :

Write a function that simulates the national lottery

Assume that you buy a lifetime subscription to the lottery i.e. your numbers stay the same and you play the lottery once a week (calculate the approximate value of the subscription). Assume that:
Matching 6 numbers - £1,000,000
Match 5 - £1000
Match 4 - £50
Match 3 - £10

After seeing results do you think it is statistically wise to play the lottery
(Hint: Use the random number generator to create the lottery numbers each week.)