# Hello, I am trying to plot the transmission coefficient vs energy for the double barrier potential, but I get an error. May I know what I have done wrong here?

조회 수: 14(최근 30일)
Craig Egan Allistair Tan 2021년 10월 14일
편집: Alan Stevens 2021년 10월 15일
V_0 = 0.2800; % Barrier strength in eV
hbar = 1.054571596e-34; % Reduced Planck constant
m = 5.465629128e-32; % 0.06*m_e
L = 1.00000e12; % Well width of the RTD
a = 1.00000e11; % Barrier width
x = 0.2801:0.0001:0.6000;
k = @(x) sqrt(2*m*x)/hbar;
etta = @(x) sqrt(2*m*(x-V_0))/hbar;
gamma = @(x) V_0/(x*sqrt(1-(V_0/x)));
nu = @(x) (2-(V_0/x))/(sqrt(1-(V_0/x)));
b = @(x) sin(k*L);
d = @(x) sin(2*k*L);
s = @(x) sin(etta*a);
u = @(x) sin(2*etta*a);
y = @(x) (1-gamma*b^2+nu*u^2-nu*gamma^2*d*u*s^2+4*gamma^4*b^2*s^4)^(-1);
plot(x,y), xlabel('E'), ylabel('T(E)')

댓글을 달려면 로그인하십시오.

### 답변(1개)

Alan Stevens 2021년 10월 14일
See the following
V_0 = 0.2800; % Barrier strength in eV
hbar = 1.054571596e-34; % Reduced Planck constant
m = 5.465629128e-32; % 0.06*m_e
L = 1.00000e12; % Well width of the RTD
a = 1.00000e11; % Barrier width
x = 0.2801:0.0001:0.6000;
k = @(x) sqrt(2*m*x)/hbar;
etta = @(x) sqrt(2*m*(x-V_0))/hbar;
gamma = @(x) V_0./(x.*sqrt(1-(V_0./x))); %%%%%% ./ and .* %%%%%%%%
nu = @(x) (2-(V_0./x))./(sqrt(1-(V_0./x))); %%%%%% ./ and .* %%%%%%%%
b = @(x) sin(k(x)*L); % k is a function of x %
d = @(x) sin(2*k(x)*L); % k is a function of x %
s = @(x) sin(etta(x)*a); % etta is a function of x %
u = @(x) sin(2*etta(x)*a); % etta is a function of x %
y = @(x) (1-gamma(x).*b(x).^2+nu(x).*u(x).^2-... % gamma, b,nu, u etc are
nu(x).*gamma(x).^2.*d(x).*u(x).*s(x).^2+... % all functions of x
4*gamma(x).^4.*b(x).^2.*s(x).^4).^(-1); % Also note ./ and .*
plot(x,y(x)), xlabel('E'), ylabel('T(E)') % y is a function of x
##### 댓글 수: 2표시숨기기 이전 댓글 수: 1
Alan Stevens 2021년 10월 15일
I guess doublebarrier_transmission is the name of your program, but the listing above plots y(x) vs x ok.

댓글을 달려면 로그인하십시오.

R2019a

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by