% Iterative fit to an experimentally measured blackbody spectrum % to determine the color temperature (in K) and the emissivity. % Uses the fitblackbody.m function. % T. C. O'Haver, May 2008 format compact global emissivity % Enter data wavelength=[200 250 300 350 400 450 500 600]; % Wavelength in nm radiance = [.007 .011 .02 .04 .07 .08 .1 .1]; % Measured radiance in Watts/cm2/sr % Perform an iterative fit using FMINSEARCH and fitblackbody.m start=3000; % generic initial guess for blackbody temperature options = optimset('TolX',0.1); % Determines how close the model must fit the data Temperature=FMINSEARCH('fitblackbody',start,options,wavelength,radiance); % Compute a model and plot it (blue line) along with % the original data (red points) model=emissivity.*1.19111E+16*wavelength.^(-5)./(exp(14380000./(wavelength*Temperature))-1); plot(wavelength,radiance,'r.',wavelength,model,'b') XLABEL( 'Wavelength, in nm' ) YLABEL('Radiance, Watts/cm2/sr') emissivity Temperature