blob: d87a1dcc6f0f49601114b25246b7048edcf47f18 (
plain)
1
2
3
4
5
6
7
8
9
10
|
clc();
clear;
// To calculate the Fermi distribution function
// given that E-Ef = kT
// fermi function FpE = 1/(1+exp((E-Ef)/kT)
// therefore FpE = 1/(1+exp(kT/kT));
// FpE = 1/(1+exp(1))
FpE=1/(1+exp(1));
printf("fermi function is %f",FpE);
//the presence of electron at that energy level is not certain
|