ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 25 Apr 2018 20:53:28 +0200Generating a random vector with elements in specified rangehttps://ask.sagemath.org/question/42168/generating-a-random-vector-with-elements-in-specified-range/ I would like to generate a random vector in which its elements are between 0 and 1 (including 0 and 1). As far as I know,
`v = random_matrix(ZZ, 1, 10)` is a way to generate a random matrix. How would I restrict the elements to the range I want?
I am trying to build a function with a probability input, and then compare the probability to each of the elements separately in the random vector.
ds22Wed, 25 Apr 2018 20:53:28 +0200https://ask.sagemath.org/question/42168/