blob: eee85982f8b44a9db11e45a4f1ebdead78ba8f18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
//Example 2.2, Page Number 55
//The Function fpround(dependency) is used to round a floating point number x to n decimal places
//Excitation Energy Calculation
clc;
r=11.8 //Relative Permeability
m=9.1*(10**-31) //Mass of electron in kilogram
me=0.26*m //Effective mass
//From equation 2.28
E=13.6*(me/m)*((1/r)**2) //E is the excitation energy in eV
E=fpround(E,4)
mprintf("The Excitation Energy is given by %.3feV",E)
|