function B = Planck(lambda,T) h = 6.626070040E-34; % Planck's constant = 6.62 * 10^-34 J*S c = 2.99e8; % speed of light = 2.99 * 10^8 m/s k = 1.38064852E-23; % Boltzmann's constant = 1.38 * 10^-23 J/K B = (2*h*c^2)*lambda.^-5.*(1./(exp(h*c./(lambda*k*T)-1))); return