Bessel problem "inf+ infi"
4 views (last 30 days)
Show older comments
Salwa Ben Mbarek
on 14 Apr 2021
Commented: Salwa Ben Mbarek
on 15 Apr 2021
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.
0 Comments
Accepted Answer
Alan Stevens
on 14 Apr 2021
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));
More Answers (0)
See Also
Categories
Find more on Bessel functions in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!