Getting Naan error while integrating with multiple parameters
1 view (last 30 days)
Show older comments
Hi, I am evaluating spectral radiance of a black body. It is giving me NaaN errors. The following is th
B = 

h=6.63*(10^-34);
k=1.381*(10^-23);
c=3*(10^8);
T=6000;
fun = @(x) (2*h*(x.^3))./(c*c*((exp((h*x)./(k*T))-1)));
x=integral(fun,380*(10^-9),750*(10^-9));
0 Comments
Answers (1)
VBBV
on 16 Mar 2023
Edited: VBBV
on 16 Mar 2023
h=6.63*(10^-34);
k=1.381*(10^-23);
c=3*(10^8);
T=6000;
fun = @(x) (2*h*(c.^2)).*(x.^(-5)).*(exp((h.*c)./(k*x*T))-1).^(-1);
x=integral(fun,380*(10^-9),750*(10^-9))
May be the equation you wrote is typed incorrectly. Check this link for planks law for black body/ solar radiation https://www.google.com/search?q=solar+irradiance+formula&prmd=isvn&source=lnms&tbm=isch&sa=X&ved=2ahUKEwjQrZfhw9_9AhUEcGwGHd9ZAnAQ_AUoAXoECAIQAQ&biw=360&bih=676&dpr=2#imgrc=kK2Z1urXtXRX2M&lnspr=W10=
2 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!