Bonsoir,
Je dois coder la loi de Planck et je n'arrive pas à obtenir la courbe. Pourriez vous m'aider svp ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
lambdamax = 20000;
Tsource = 5000;
h= 6.6260695729E-34;
c=299792458
kB=1.380648813E-23;
 
 
 
lambda=linspace(1,lambdamax,200)
 
 
 
 
function M= Planck (lambda,T)
    lambdam=lambda*10E-9; 
    M=2*h*c^2*(lambdam.^(-5)).*(exp(h*c*lambdam.^-1/kB/T)-1).^-1
    M=%pi*M
endfunction
 
intPlanck=intg(0,lambdamax,Planck)
plot(intPlanck);