Calculations/MOT-Simulator/+Simulator/@TwoDimensionalMOT/magneticFieldForMOT.m

8 lines
227 B
Mathematica
Raw Normal View History

2024-06-18 19:01:35 +02:00
function ret = magneticFieldForMOT(this, r)
ret = zeros(1,4);
alpha = this.MagneticGradient;
ret(1) = r(3)*alpha;
ret(2) = 0;
ret(3) = r(1)*alpha;
ret(4) = sqrt(ret(1)^2+ret(2)^2+ret(3)^2);
end