朱莉娅:随机正态分布

Julia : random normal distribution

我想生成 0.1 和 0.3 之间的随机正态分布,使用 randn() 我该如何使用它?

我试过这个但是没用

randn(0.1:0.3,(3,1)) # (3,1) 三行一列

试试

randn(3) * (0.3 - 0.1) + 0.1

[a,b] 范围内的随机数是

rand() * (b - a) + a