How to plot rectangular potential in matlab

8 次查看(过去 30 天)
I will try to plot something like this :
Observ that this is a rectangular potential barrier, the dashed line is the classical result of the potential U and the blue line is the quantum mechanics. The tunneling regime takes the place at intersection of the dashed line and the blue line; and the tops of the blue line is called the resonance which I have to show. My attempt is
clc
clear all
m=9.11 * 10^(-31);
U=5e-19;
E=0e-19:0.001e-19:12e-19;
a=3e-9;
h=1.36e-34;
k=sqrt(2*m.*(U-E));
k2=k/h;
c=(U^2)*(sinh(0.5*a*k2).^2)./(4*E.*(U-E));
T=1./(1+c);
plot(E,T)
But how can I get a plot like this ?

采纳的回答

Star Strider
Star Strider 2018-11-8
Your code appears to be correct. If you want the labels, try this:
m=9.11E-31;
U=5e-19;
E=0e-19:0.001e-19:12e-19;
a=3e-9;
h=1.36e-34;
k=sqrt(2*m.*(U-E));
k2=k/h;
c=(U^2)*(sinh(0.5*a*k2).^2)./(4*E.*(U-E));
T=1./(1+c);
[respks, locs] = findpeaks(T);
figure
plot(E,T)
hold on
plot([0.5 0.5]*1E-18, ylim, '--r')
hold off
text(E(locs+275), respks*0.99, compose('\\bf{\\leftarrow res %d}', 1:3), 'HorizontalAlignment','left', 'VerticalAlignment','top', 'Rotation', -75)
text(0.5E-18, 0.1, sprintf('\\bftunneling \\rightarrow'), 'HorizontalAlignment','right')
Experiment to get the result you want.
  8 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Quantum Mechanics 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by