summaryrefslogtreecommitdiff
path: root/2258/CH2/EX2.1/2_1.sce
blob: 182ca4144252977db7bbda9090b42aef7c1ac2b7 (plain)
1
2
3
4
5
6
7
8
9
clc();
clear;
// To calculate the Fermi function
// given that E-Ef = kT
// fermi function FE = 1/(1+exp((E-Ef)/kT)
// therefore FE = 1/(1+exp(kT/kT));
// FE = 1/(1+exp(1))
FE=1/(1+exp(1));
printf("fermi function is %f",FE);