Fixed matlab calculations

This commit is contained in:
2023-03-22 14:13:17 +04:00
parent 78916d0ec9
commit bd8cd9e635
6 changed files with 13 additions and 19 deletions

View File

@@ -1,4 +1,6 @@
% Bessel beam
function b = bessel(r, r_max, w0, P)
b = besselj(0, 2.405/w0 * r).^2;
function b = bessel(r, w0, r_max)
ring_radius = 2.405; % radisu of the first ring of the besselj_0
A = 2 * ring_radius / (w0 * r_max * exp(0.5)) * 2 * pi * integral(@(r) r.*besselj(0, ring_radius/w0 * r).^2, 0, r_max);
b = A * besselj(0, 2.405/w0 * r).^2;
end