Bessel problem "inf+ infi"

4 visualizaciones (últimos 30 días)
Salwa Ben Mbarek
Salwa Ben Mbarek el 14 de Abr. de 2021
Comentada: Salwa Ben Mbarek el 15 de Abr. de 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.

Respuesta aceptada

Alan Stevens
Alan Stevens el 14 de Abr. de 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));
  1 comentario
Salwa Ben Mbarek
Salwa Ben Mbarek el 15 de Abr. de 2021
Thank you so much for your help sir !

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Bessel functions en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by