Simple example of the use of the FMINSEARCH function to fit the blackbody equation to the emission spectrum of an incandescent body for the purpose of estimating its color temperature and emissivity. fitblackbody.m is the fitting function. BlackbodyDataFit.m is a script that fits a small set of experimental data. Demofitblackbody.m is a script that fits a computer-generated blackbody spectrum with simulated photon noise and temperature noise (random variation in the temperature from point to point in the spectrum).
Tom O'Haver (2021). Fit blackbody equation to spectrum (https://www.mathworks.com/matlabcentral/fileexchange/20129-fit-blackbody-equation-to-spectrum), MATLAB Central File Exchange. Retrieved .
Thank you for sharing these files, I just have a question regarding the equation for spectral radiance. You consolidate all of the physical constants into a number, but it seems that number has the wrong sign in the exponential. For example, by my calculations, I get 2*h*c^2 = 1.19E-16, but the code has it as E+16. Why is this?
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!