Calculations/+Simulator/@Oven/initialPositionSampling.m

8 lines
247 B
Mathematica
Raw Normal View History

function ret = initialPositionSampling(this)
n = this.NumberOfAtoms;
phi = 2 * pi * rand(n,1);
rho = this.Beta * 0.5 * this.NozzleLength * sqrt(rand(n,1));
ret = [-this.OvenDistance * ones(n,1), rho.*cos(phi), rho.*sin(phi)];
end