MATLAB: To reproduce a wave packet

wavepacket

How do I plot this wave to reproduce a wave packet using MATLAB?
Below link might be useful:

Best Answer

Hope this helps
W= linspace(0, 10.0, 500);
plot(W, sin(W*2*pi) - sin(W*1.1*2*pi))