Generating wavepackets in MATLAB
22 次查看(过去 30 天)
显示 更早的评论
Hi, I am trying to generate wavepackets for a complex function using MATLAB, however, I am not sure on the approach. Does MATLAB Forum have a suggestion?
Thanks!
0 个评论
采纳的回答
Youssef Khmou
2018-1-26
Among the methods for generating wavepackets is linear superposition, considering the spatial dimension x, an elementary complex wavepacket can be generated as follows:
x=-20:0.005:20;
w=20;
dw=0.1;
y=exp(j*w*x)+exp(j*(w-dw)*x)+exp(j*(w+dw)*x);
plot(x,real(y));
the parameter dw is the frequency difference between the components, and has an impact on coherence length.
5 个评论
Youssef Khmou
2018-1-31
编辑:Youssef Khmou
2018-1-31
As an illustrative example, consider the 1D wavefunction of particle localized at x0=5 at t=0 with variables w and k:
x=0:0.01:10;
x0=5;
w=2;
k=2;
t=0;
the waveform can be generated by:
f=cos(k*(x-5)-w*t).*exp(-(k*(x-5)-w*t).^2);
for different values of t=1,2,..., you can compute the corresponding wavefunction.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!