# Gaussian Wavepacket Tunnel Through double barrier

Hello,
I was trying to design a movie in Matlab. A Gaussian wave packet moves toward double barrier then some wave reflect and some pass out from the barrier . i design the double barrier in Matlab. but dont know how to make movie in Matlab with Gaussian wavepacket. can you help. Do u have the code in Matlab

Related Quantum Physics News on Phys.org
Pythagorean
Gold Member
Hello,
I was trying to design a movie in Matlab. A Gaussian wave packet moves toward double barrier then some wave reflect and some pass out from the barrier . i design the double barrier in Matlab. but dont know how to make movie in Matlab with Gaussian wavepacket. can you help. Do u have the code in Matlab
There is a programming subforum down below.

Short answer: the plot command in a for loop. You plot your function (the gaussian wave packet) and then compute the new shape of the function every time through the for loop, and then plot it.

You can use the pause command (type help pause) to put time between your frame changes.

Pythagorean
Gold Member
also check out 'help movie'. You can collect each of your plots as a movie frame and build a movie out of it, then once you have the movie array, you can adjust the frame-rate and the number of plays as you want.

Hej Pythoagorean,
Thankyou very much for reply. i use the movie frame and it work for some equation. but i was trying move to gaussian wave packet but dont know how implement on matlab mathematically . do u have code for Gaussian wave packet

Pythagorean
Gold Member
Here's the general analytic structure:

http://musr.physics.ubc.ca/~jess/hr/skept/GWP/

Shooting from the hip, I'd use a runge-kutta algorithm to handle the integral, but you may want to see if there's some more experienced replies. I've never coded a gaussian wave packet before.

Last edited by a moderator:
f95toli