Return vector when broadcasting over mean vector to generate random numbers

rand(<distribution>) creates a single random value, whereas rand(<distribution>, 1) creates a 1-vector of random values. Therefore, you just have to remove the last argument of the broadcasted rand:

rand.(Normal.([5;10],1))
2 Likes