A very quick plot of particle-in-a-box wavefunctions with interactive control over the box length, $L$ – this kind of thing is very easy with Jupyter and ipywidgets' interact
method: Just define a function to plot the wavefunction for a provided argument $L$ and pass it to interact
along with a range and stepsize of values of $L$ and a slider will appear above the plot. Event callbacks and range-checking are all handled for you.
The Jupyter Notebook can be downloaded here or using the nbviewer website. Some example (static!) images of the output plot are given below.
Share on Twitter Share on Facebook
Comments
Comments are pre-moderated. Please be patient and your comment will appear soon.
There are currently no comments
New Comment