version (1.73 KB) by Phillip M. Feldman
compute spectral radiance of ideal blackbody radiator


Updated 14 May 2009

View License

Planck2 computes the spectral radiance of an ideal blackbody radiator in units of W/m^2/sr/Hz as a function of the frequency in Hz and temperature in Kelvin.

The temperature T must be specified as a scalar (single value). The frequency nu may be specified as either a scalar or a vector. If nu is a vector, the function returns a vector of spectral radiances (one for each wavelength). If you want to evaluate the spectral radiance at a large number of frequencies, it is far more efficient to create a vector of wavelengths and call this function only once rather than making a separate call for each wavelength.

Reference: Wikipedia article entitled "Black Body", URL=


Version 2.0, 4-3-2007: Modified code to use the first three terms of a Taylor expansion for exp(x)-1 when x is less than 4.9e-6. For x < 4.9e-6, the three-term Taylor expansion is more accurate.

Version 1.0, 3-22-2007: Initial version.

Cite As

Phillip M. Feldman (2022). Planck2.m (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!