gpt4 book ai didi

math - 在Mathematica中绘制量子谐波振荡器

转载 作者:行者123 更新时间:2023-12-04 22:56:27 25 4
gpt4 key购买 nike

如何使用Mathematica绘制量子谐波振荡器的图?
我想绘制一个类似附图的外观图。

Harmonic Oscillator

最佳答案

Energy[n_] := (2 n + 1) ℏ/2 ω;

ψ[z_, n_] :=
1/2 1/Sqrt[2^n n!] ((m ω)/(π ℏ))^(1/4)
Exp[-((m ω z^2)/(2 ℏ))] HermiteH[n, Sqrt[(m ω)/ℏ] z];

m = 1;
ω = 1;
ℏ = UnitConvert[Quantity[1, "PlanckConstant"], "SIBase"];
ℏ = QuantityMagnitude[ℏ];
ℏ = 1;

Plot[{Evaluate@Table[Energy[n] + ψ[z, n], {n, 0, 5}],
Evaluate@Table[Energy[n], {n, 0, 5}], z^2/2}, {z, -5, 5},
PlotRange -> {0, 7},
PlotStyle ->
Join[{Red, Yellow, Green, Blue, Purple, Cyan},
Table[{Gray, Opacity[0.3]}, {n, 0, 5}], {Black}],
Filling -> {1 -> Energy[0], 2 -> Energy[1]}]


quantum oscillator

关于math - 在Mathematica中绘制量子谐波振荡器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49719923/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com