I’m sure that there is a function for that. I just want to make a list of 1000 numbers, each one of them which should be random.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To generate a 1000-element list with random numbers between 1 and 10:
Change 10 and 1000 to appropriate numbers. If you omit the 10 from from the
rand:uniformcall, you’ll get a random floating point number between 0.0 and 1.0.On Erlang versions below 18.0: Use the
randommodule instead. Caution! You need to runrandom:seed/3before using it per process, to avoid getting the same pseudo random numbers.