
function E=exitance(lambda,T) // lambda en micrometres
    h=6.626e-34;
    c=299792458; 
    k=1.38e-23;
    lambda = lambda * 1e-6;
    E = 2*%pi*h*c^2/(lambda^5*(exp(h*c/(lambda*k*T))-1))*1e-6
endfunction
             

n=200;
lambda = linspace(0.01,3,n).';
T = 5800;
e = zeros(n,1);
for i=1:n,
    e(i) = exitance(lambda(i),T);
end
             

n=200; 
lambda = logspace(-1,2,n).'; 
e1 = zeros(n,1); e2=e1; e3=1; e4=e1; e5=e1; L=lambda;
for i=1:n,
    e1(i)=log10(exitance(lambda(i),10000));
    e2(i)=log10(exitance(lambda(i),5800));
    e3(i)=log10(exitance(lambda(i),3000));
    e4(i)=log10(exitance(lambda(i),1000));
    e5(i)=log10(exitance(lambda(i),300));
    L = log10(lambda);
end
             

phi=1200;   
sigma=5.67e-8; 
Tcorps=(phi/sigma)^0.25  
            
 
n=700;  
lambda = linspace(0.01,20,n).'; 
Tsoleil = 5800; 
eSolaire = zeros(n,1);
for i=1:n,
    eSolaire(i) = exitance(lambda(i),Tsoleil)*(Tcorps/Tsoleil)^4;
end
eCorps = zeros(n,1);
for i=1:n,  
    eCorps(i) = exitance(lambda(i),Tcorps);
    if eCorps(i)<1e-99 then
        eCorps(i)=0;
    end
end
            

sigma=5.67e-8;
Te=293;
n=50;
T=linspace(270,350,50).';
phi=zeros(n,1); 
hr=4*sigma*Te^3
phiLin=zeros(n,1);
for i=1:n,
    phi(i)=sigma*(T(i)^4-Te^4);
    phiLin(i)=hr*(T(i)-Te);
end
              

hr
             
