13 lines
216 B
Matlab
13 lines
216 B
Matlab
|
|
%physical constants in MKS units
|
|
|
|
hbar = 1.054e-34;
|
|
q = 1.602e-19;
|
|
m = 9.110e-31;
|
|
|
|
%generate lattice
|
|
|
|
N = 100; %number of lattice points
|
|
n = [1:N]; %lattice points
|
|
a = 1e-10; %lattice constant
|
|
x = a * [1:1:N]; |