I'm new to Mathematica. I need to generate a list of 1000 triplets of random numbers {r, p, t}
, so that 0 < r < 1
, 0 < p < 2 π
and 1 < t < 10
, with t
being an integer.
I've found the two functions RandomReal
and ``RandomInteger`, but can't seem to obtain what I need -- namely not a list.
I need to pass this list of triplets to a function f[r_, p_, t_]
.
list=Transpose@{RandomReal[{0,1},1000],RandomReal[{0,2 Pi},1000], RandomInteger[{1,10},1000]}
is the most straight forward. Then you can dof@@@list
$\endgroup$@@@
is shorthand forApply
with a levelspec of{1}
; see the documentation forApply
for more information. $\endgroup$