How to solve and plot the equation contain Bessel function

1 回表示 (過去 30 日間)
Jun Xiao
Jun Xiao 2020 年 3 月 16 日
回答済み: Walter Roberson 2020 年 3 月 16 日
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')

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 3 月 16 日
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.

カテゴリ

Help Center および File ExchangeBessel functions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by