MATLAB: Writing this Mathcad equation in Matlab

bessel functionpsf

hi, Im trying to convert an equation from mathcad into matlab but am struggling. the equation is:

Best Answer

Try this:
psi = 0.142;
Io = 1;
f_vir2 = @(r) 4*Io * abs(integral(@(rho)besselj(0, pi*rho*r*psi).*rho, 0, 1)).^2;
r = pi;
test_call = f_vir2(r)