Part 10: The spectral radiance emitted by a blackbody in thermal equilibrium at
ID: 2033439 • Letter: P
Question
Part 10: The spectral radiance emitted by a blackbody in thermal equilibrium at a definite 3 temperature is described by Planck's Law: he (2)= 10 hc A,T where, B-Spectral radiance [W/ (sr m2nm)) (NOTE: sr-Steradian-SI unit for solid angle) h-Planck constant-662607x 10'34Js ?-wavelength [nm] K-Boltzmann constant-1.38065 x 10J/K T-temperature (K] e- speed of light-2.99 x 10"nm/s Create a function in MatLab to accomplish the following: a) Take as inputs two (2) vectors: a wavelength vector, lamdaVee, and a temperature vector Temp. The values we will test are: i. lamdaVee: 525 nm (blue), 750 (red) and 1200 nm (infrared) ii. Temp: 7200 K, 5680 K and 4000 K Initialize a 3 × 3 array called spectral llinti Often, arrays are initialized with all elements having the same value, such as zero. b) c) Using for loops, calculate the spectral radiance for each combination of wavelength and temperature i. Set the remaining 8 elements in spectral with the following format: 7/8 a. As one moves down through the rows, the wavelength goes from shortest to longest (525nm 1200 nm) As one moves across the columns, the temperature goes from hottest to coolest (7200 K b. 4000 K) d) The function should have three outputs (3): I. the updated array spectral ii. vector consisting of all three spectral radiance values for T-7200 K iii. a scalar value approximating the blue irradiance of our sun (-525 nm, T-5680 K).Explanation / Answer
Check this code for the answer of a), b), c) and d)i):
h=6.62607*10^-34; c=3*10^8; Kb=1.38065*10^-23;
lambda=[525,750,1200];
T=[7200,5680,4000];
for i=1:3
for j=1:3
spect=((2*h*c*c)./((lambda(:,i)^5).*(exp((h*c)./(lambda(:,i)T(:,j)))-1)));
spect1(:,j)=spect; %here u wil get a row matrix for single lamda
end
spectral(i,:)=spect1; %here u wil get a 3×3 array
end
For the answer of d)ii) write following command
spectral(:,1)
For the answer of d)iii) write the following command
spectral(1,:)