Random Gaussian number generators
5 ビュー (過去 30 日間)
I am introducing disorder in a 3D lattice which has matrix of L^3 into L^3.
for box disorder "function disorder = generate_disorder(L, W)
% Generate a disordered sequence of on-site energies (diagonal elements of the matrix)
disorder = W * (rand(L, L, L) - 0.5);
I am getting the result.
I want to modify it for generating disorder from gaussian distribution.
How to modify this code?