Building a Bessel function in MATLAB

In matlab, how do you draw

f (r) = {2 * J1 (a * r) / r} ^ 2

where a = 2 * pi and J1 is the Bessel function of the first kind and r = sqrt (x ^ 2 + y ^ 2)

This should be displayed in 3D, i.e. look like a bubble (not sure how to do this)

+3
source share
1 answer

Use besselj --- Bessel function of the first kind --- generate J1. I think you need to change aand rto create a "bubble".

I generated the following by modifying xboth yfrom -1:0.01:1and building the anchor points (x,y,f), I don’t know if this is really what you want.

The code

a = 2*pi;
[X Y] = meshgrid(-1:0.01:1,-1:0.01:1);
R = sqrt(X.^2+Y.^2);
f = (2*besselj(1,a*R(:))./R(:)).^2;
mesh(X,Y,reshape(f,size(X)));
axis vis3d;

Doresdoom, axis vis3d; set(gca,'Zscale','Log').

alt text

Mesh

alt text

+10

Source: https://habr.com/ru/post/1744075/


All Articles