How to solve and plot the equation contain Bessel function

3 visualizzazioni (ultimi 30 giorni)
I tried to use matlab to solve the equation which contain two different Bessel function and plot them, but I cannot solve it, even I used vpasolve or solve command, does anyone can help me with this? And what if I want to calculate the equation which need to differentiate some Bessel functions?
clc; clear all; close all;
syms a
n2 = 1:0.001:1.44;
n1 = 1.445;
y = n2/n1;
d = y.^2+1;
for n3 = 1000:1440
a1 = (((n3*0.001)./n1).^2+1)*besselj(1,a);
b1 = (a*besselj(2,a));
c1= a1-b1==0;
d = solve(c1,a);
end
plot(d,y,'b')

Risposte (1)

Walter Roberson
Walter Roberson il 16 Mar 2020
syms a
n2 = 1:0.001:1.44;
n1 = 1.445;
y = n2/n1;
d = y.^2+1;
for n3 = 1000:1440
a1 = (((n3*0.001)./n1).^2+1)*besselj(1,a);
b1 = (a*besselj(2,a));
c1= a1-b1==0;
d(n3-1000+1) = vpasolve(c1,a);
end
plot(n1, d, 'b')
However, you will find that the solution is a constant 0. Besselj have zeros at 0, so making a = 0 gives you both sides equal to 0, which is an equality.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by