matlab - Random number - Choose seed -
because of 1 project have make use of pseudo random numbers normal distribution.
to respect, i'm putting down:
nn_u = complex((normrnd(0,1.0,size(h_u))),(normrnd(0,1.0,size(h_u)))); nn_v = complex((normrnd(0,1.0,size(h_u))),(normrnd(0,1.0,size(h_u)))); nn_w = complex((normrnd(0,1.0,size(h_u))),(normrnd(0,1.0,size(h_u)))); size(h_u) = [4096,1];
this way don't have real access seed number. expect that, using above mentioned form, there 6 seeds, means 1 different seed of 6 times called normrnd
function.
what i'd @ moment generate 6 independent representations, happens above, 1 seed point, can pick out of range [1,999]
.
to achieve thinking proceed way:
n = 4096; nn_tmp = normrnd(0,1,[n*6,1]); nn_u = complex(nn_tmp(1:n,1),nn_tmp(n+1:2*n,1)); nn_v = complex(nn_tmp(2*n+1:3*n,1),nn_tmp(3*n+1:4*n,1)); nn_w = complex(nn_tmp(4*n+1:5*n,1),nn_tmp(5*n+1:6*n,1));
but way, don't have direct access seed; don't know if kind of operation i'd has strong theoretical validation.
any support welcome.
i think can use rng seed , use randn
instead of normrnd
problem
so like
seed = 120; %for example rng(seed, 'twister'); nn_u = complex(randn(size(h_u)),randn(size(h_u))); nn_v = complex(randn(size(h_u)),randn(size(h_u))); nn_w = complex(randn(size(h_u)),randn(size(h_u)));
Comments
Post a Comment