In a given number of trials, I need to get the first and last number of rolls whose value is defined by the user.
Show older comments
Hi everyone, I looking for a code to get the first and last number of 1000 rolls whose value was equal to 4. Assume, for 1000 rolls of a pair of dice, find the first and last number of rolls whose value was equal to 4 and whose value lies inbetween 3 and 7. I used to randi function to generate random numbers.
1 Comment
Jos (10584)
on 28 Oct 2015
This looks like homework. What did you try so far? Take a look at FIND
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!