Bessel problem "inf+ infi"
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Salwa Ben Mbarek
am 14 Apr. 2021
Kommentiert: Salwa Ben Mbarek
am 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 Kommentare
Akzeptierte Antwort
Alan Stevens
am 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));
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Bessel functions finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!