-
Notifications
You must be signed in to change notification settings - Fork 0
/
fullpotential.asv
39 lines (37 loc) · 997 Bytes
/
fullpotential.asv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
%Âîçâðàùàåò ïîëíûé ïîòåíöèàë ðåøåòêè äëÿ îòîáðàæåíèÿ íà ãðàôèêå
function U = fullpotential(U_GaAs, U_AlAs)
global N_GaAs
global N_AlAs
global U_left
global N_period
global U_elstatic
global N_surface
global N_well
if delta_U > 0
%Ýòî ãàììà ýëåêòðîíû
U_GaAs = 0;
U_AlAs = delta_U;
else
U_GaAs = abs(delta_U);
U_AlAs = 0;
end
U = [];
Uc = U_left*ones(1, N_surface);
U_elstatic_part = U_elstatic(1:N_surface);
U = [U Uc + U_elstatic_part];
%Ñ÷åò÷èê òåêóùåãî øàãà
N_count = N_surface;
for i=1:N_period/2
Uc = U_GaAs*ones(1, N_GaAs);
U_elstatic_part = U_elstatic(N_count + 1:N_count + N_GaAs);
N_count = N_count + N_GaAs;
U = [U Uc + U_elstatic_part];
Uc = U_AlAs*ones(1, N_AlAs);
U_elstatic_part = U_elstatic(N_count + 1:N_count + N_AlAs);
U = [U Uc + U_elstatic_part];
N_count = N_count + N_AlAs;
end
Uc = U_GaAs*ones(1, N_well);
U_elstatic_part = U_elstatic(N_count + 1:N_count + N_well);
U = [U Uc + U_elstatic_part];
U = symm_array(U);