Bessel problem "inf+ infi"

4 次查看(过去 30 天)
Hello,
I'm getting a "inf+ infi" error or nan when I compute the following code with bessel functions:
freq = linspace(4*1e6, 31*1e6, 0.5*1e6) ;
w = 2*pi.*freq; % angular frequency
%r = d/2; % wire radius
p= 6.5 *1e-3;
d= 0.6*1e-3;
mu0 = 4*pi*1e-7;
mur= 200;
eta0 = 377;
sigw= 1.32*1e6;
Rw = (pi*sigw*(r^2))^(-1);
%tau = mu0*sigw*(r^2);
tau = mu0*mur*sigw*(r^2);
num = sqrt(1i.*w.*tau).*besselj(0, sqrt(1j.*w.*tau));
The program is simple tough, I have numerical value for sqrt(1j.*w.*tau) but when I apply Bessel to it I don't get a numerical value.
Could you please help me ?
Thank you.

采纳的回答

Alan Stevens
Alan Stevens 2021-4-14
The following works with no inf or nan problems
freq = linspace(4*1e6, 31*1e6, 100) ;
w = 2*pi.*freq; % angular frequency
p= 6.5 *1e-3;
d= 0.6*1e-3;
r = d/2; % wire radius
mu0 = 4*pi*1e-7;
mur= 200;
eta0 = 377;
sigw= 1.32*1e6;
Rw = (pi*sigw*(r^2))^(-1);
tau = mu0*mur*sigw*(r^2);
num = sqrt(1i.*w.*tau).*besselj(0, sqrt(1j.*w.*tau));

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Bessel functions 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by