Inspired by the Problem 1713 by Chris E.
Here is the code that generates the first lottery number:
rng('shuffle');
number1=randi([10,20]);
for j=1:number1
round(rand(1,1));
endCan you find the number even with the rng('shuffle')?
As everybody knows hacking methods, I prefer a logical solution.
Good luck!
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers16
Suggested Problems
-
Flip the main diagonal of a matrix
923 Solvers
-
Longest run of consecutive numbers
6731 Solvers
-
Find the maximum number of decimal places in a set of numbers
3599 Solvers
-
Make a run-length companion vector
663 Solvers
-
323 Solvers
More from this Author43
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!