%Plancks function for black body radiation clc clear all %(i) %inputing values h
ID: 3281376 • Letter: #
Question
%Plancks function for black body radiation
clc
clear all
%(i)
%inputing values
h = 6.63*10^-34 %value is in Js
k = input("Enter the value for k; "); %value in m^2kgs^-2K^-1
c = 3.0*10^8 %value in ms^-1
lambda1 = input("Enter the value for wavelength; "); %value in meters
T1 =input("Enter the value for temperature; "); %value in Kelvins
f1 = (((2*h*(c)^2)/(lambda1)^5)*(1/(e^((h*c)/(lambda1*k*T1))-1)));
disp(f1);
%(ii)
%calculating and plotting
lambda2 = 10e-9:10*10^-9:2000*10^-9; %value in nanometers
maximumfunc2 = 0;
x = 1;
for T2 = 2000:1000:6000;
f2 = (((2*h*(c).^2)./((lambda2).^5)) .* (1./(exp((h*c)./(lambda2.*k.*T2))-1)));
hold on
plot(lambda2, f2)
maximumfunc2(x) = max(f2);
x += 1;
end
maximumfunc2'
Explanation / Answer
%your iii part answer c=3.0*10.^8;% speed of light in vaccum h=6.63*10.^-34;% Planck constant k=1.38*10.^-23;% Boltzmann constant step= 2.8429e-008; lambda=[0:step:2*10.^-6]; T=1;% Temperature initiatlisation for i=2000:500:6000 Ii=(2*pi.*h.*(c.^2))./((lambda.^5).*(exp((h.*c)./(k.*T.*lambda.*i))-1)); plot(lambda,Ii) hold on grid end xlabel('lambda') ylabel('I(lambda)') title('Wein displacement law') legend('T=2000','T=2500','T=3000','T=3500','T=4000','T=4500','T=5000','T=5500','T=6000') hold off
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.