8 lines
227 B
Matlab
8 lines
227 B
Matlab
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 |