# How to plot wave function for finite square well? [Physics question]

65 ビュー (過去 30 日間)
Niklas Kurz 2022 年 3 月 10 日
コメント済み: Star Strider 2022 年 3 月 13 日
A question addressed to other physicist among the MATLAB community:
Considering a finite sqaure well potential:
It turns out for this certain potential a symmetric wave function can be found that fits inside
Whit constants and with the energy Eof the particle and usual physical constants.
In addition the energy has to be quantised acording to as well as
Now when I atempt plotting the piecewise wave function I don't really get continous pieces:
Ce = 1.6e-19;
scale = 1e-10;
L = 2*scale;
m = 9.109*1e-31;
h = 1.05*1e-34;
V = 100*Ce;
syms k
k = vpasolve(k*tan(L/2*k) == sqrt(2*m/h^2*V-k^2),k);
beta = k*tan(L/2*k);
dx = 0.01*scale; n = 2; x1 = -L/2*n:dx:-L/2; x2 = -L/2:dx:L/2; x3 = L/2:dx:L/2*n;
C = 1; A = 1;
psi1 = C*exp(beta*x1); psi2 = A*cos(k.*x2); psi3 = C*exp(-beta*x3);
plot(x1,psi1); hold on; plot(x2,psi2); hold on; plot(x3,psi3)
I don't right know if I messed up the physics or the code itself.
##### 2 件のコメントなしを表示なしを非表示
jessupj 2022 年 3 月 10 日
question/maybe hint: where did you get the value C=1?
Niklas Kurz 2022 年 3 月 13 日
Yea, I'm also confused. In the notes I studies it was said amplitude is off importance (only for normalisation) however I do think it does matter as well.

サインインしてコメントする。

### 採用された回答

Star Strider 2022 年 3 月 11 日
I do not know what it supposed to look like, however to get a continuous plot, horizongally concatenate the respectrive row vectors —
Ce = 1.6e-19;
scale = 1e-10;
L = 2*scale;
m = 9.109*1e-31;
h = 1.05*1e-34;
V = 100*Ce;
syms k
k = vpasolve(k*tan(L/2*k) == sqrt(2*m/h^2*V-k^2),k);
beta = k*tan(L/2*k);
dx = 0.01*scale; n = 2; x1 = -L/2*n:dx:-L/2; x2 = -L/2:dx:L/2; x3 = L/2:dx:L/2*n;
C = 1; A = 1;
psi1 = C*exp(beta*x1); psi2 = A*cos(k.*x2); psi3 = C*exp(-beta*x3);
plot(x1,psi1); hold on; plot(x2,psi2); hold on; plot(x3,psi3)
figure
plot([x1,x2,x3], [psi1,psi2,psi3])
grid
.
##### 2 件のコメントなしを表示なしを非表示
Niklas Kurz 2022 年 3 月 13 日
Nice Interpretation
Star Strider 2022 年 3 月 13 日
Thank you!

サインインしてコメントする。

### カテゴリ

Help Center および File ExchangeVector Fields についてさらに検索

### Community Treasure Hunt

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

Start Hunting!

Translated by