%
% Lecture 1
%

home
clear

% black-body radiation

kB=1.38065e-23; % J/ K
h=6.62608e-34; % J s
c=2.99792458e8; % m/s
hc=h*c*1e9; % J nm

rho_Rayleigh=@(lambda,T) 8*pi*kB*T./lambda.^4;

T=300;
[x,y]=fplot(@(x) rho_Rayleigh(x,T),[1e4 10e4])

figure('color',[1 1 1]);
plot(x,y,'r-')
xlabel('\lambda (nm)'); ylabel('J/nm^4');
hold;
rho_Planck=@(lambda,T) 8*pi*hc/((lambda.^5).*exp((hc/(lambda*kB*T))-1));

[xp,yp]=fplot(@(x) rho_Planck(x,T),[1 100000]);
plot(xp,yp,'b-')
axis([0 10e4 0 2e-36])
legend('Rayleigh-Ritz','Planck')
title('Comparison of classical and quantum blackbody radiation at 300 K')
x =
       10000
       10180
       10360
       10540
       10720
       10900
       11080
       11260
       11440
       11620
       11800
       11980
       12160
       12340
       12520
       12700
       12880
       13060
       13240
       13420
       13600
       13780
       13960
       14140
       14320
       14500
       14680
       14860
       15040
       15220
       15580
       15760
       16120
       16480
       16840
       17200
       17560
       17920
       18280
       18640
       19360
       19720
       20440
       21160
       21880
       22600
       23320
       24760
       26200
       27640
       29080
       31960
       34840
       37720
       43480
       49240
       60760
       83800
      100000
y =
  1.0e-034 *
    0.1041
    0.0969
    0.0904
    0.0843
    0.0788
    0.0737
    0.0691
    0.0648
    0.0608
    0.0571
    0.0537
    0.0505
    0.0476
    0.0449
    0.0424
    0.0400
    0.0378
    0.0358
    0.0339
    0.0321
    0.0304
    0.0289
    0.0274
    0.0260
    0.0248
    0.0235
    0.0224
    0.0213
    0.0203
    0.0194
    0.0177
    0.0169
    0.0154
    0.0141
    0.0129
    0.0119
    0.0109
    0.0101
    0.0093
    0.0086
    0.0074
    0.0069
    0.0060
    0.0052
    0.0045
    0.0040
    0.0035
    0.0028
    0.0022
    0.0018
    0.0015
    0.0010
    0.0007
    0.0005
    0.0003
    0.0002
    0.0001
    0.0000
    0.0000
Current plot held