MATLAB Answers

How to "invert" integral function?

2 views (last 30 days)
Cédric Pereira
Cédric Pereira on 7 Apr 2021
Answered: David Hill on 7 Apr 2021
I'm trying to calculate the blackbody spectral radiance using planck function:
close all;
clear all;
% physical constants
h = 6.6260693e-34;
c = 299792485.0;
k = 1.380658e-23;
T = 6500;
f = @(wl) ((((2.0.*h.*c^2)./(wl*1e-6).^5).*(1.0./(exp(((h.*c)./(k.*T.*wl*1e-6)))-1))).*1e-6);
wl_range = [0.1:0.1:8.0];
BB = f(wl_range);
set(gca, 'YScale', 'log');
xlabel('\bf\fontname{arial}\fontsize{14}Wavelength [unm]');
ylabel('\bf\fontname{arial}\fontsize{14}Spectral Radiance [^{-1}.m^{-2}.{um}^{-1}]');
title('\bf\fontname{arial}\fontsize{14}Blackbody Source','Fontsize',14);
Then I integrated the wavelength range (from 0.1 to 8.0) and I got a power of 3.22e7 [W]
Power = integral(f,0.1,8.0)
Now, my problem!
I would like to do the oposite, just knowing the power value (and the temperature and the interested wavelength range) generate a curve as you can see on the plot above... do you have any solution how I can "invert" the integral?
Thank you in advance.

Answers (1)

David Hill
David Hill on 7 Apr 2021
I might not understand your question completely. If you know the temperature and interested wavelength range, the curve can be generated as you have already done. If you know the power and interested wavelength range, then the temperature can be found.
h = 6.6260693e-34;
c = 299792485.0;
k = 1.380658e-23;
syms T wl;
f =((((2.0*h*c^2)/(wl*1e-6)^5)*(1.0/(exp(((h*c)/(k*T*wl*1e-6)))-1)))*1e-6);





Community Treasure Hunt

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

Start Hunting!

Translated by