Skip to content
Snippets Groups Projects
Commit 27a102e8 authored by Lars kleyn Winkel's avatar Lars kleyn Winkel
Browse files

Update src/7_tight_binding_model_sol.md

parent ebd204a4
No related branches found
No related tags found
1 merge request!58Solutions lecture 7
Pipeline #27912 canceled
......@@ -34,13 +34,12 @@ Group velocity is given as $v=\hbar^{-1}\frac{\partial E}{\partial k}$ with $E=\
3.
```python
##pyplot.subplot(1,2,1)
##k = np.linspace(-pi/2, pi/2, 300)
##pyplot.plot(k, np.cos(k))
##pyplot.xlabel('$k$'); pyplot.ylabel('$v(k)$')
##pyplot.xticks([-pi/2, 0, pi/2], [r'$-\pi/2$', 0, r'$\pi/2$'])
##pyplot.yticks([0, 1], [0, r'$2\sqrt{\frac{\kappa}{m}}$'])
##pyplot.hlines([1], -pi/2, 0, linestyles='dashed')
pyplot.subplot(1,2,1)
k = np.linspace(-pi/2, pi/2, 300)
pyplot.plot(k, np.cos(k))
pyplot.xlabel('$k$'); pyplot.ylabel('$v(k)$')
pyplot.xticks([-pi/2, 0, pi/2], [r'$-\pi/2$', 0, r'$\pi/2$'])
pyplot.yticks([0, 1], [0, r'$2\sqrt{\frac{\kappa}{m}}$'])
pyplot.subplot(1,2,2)
w = np.linspace(-0.95, 0.95, 300)
......@@ -48,8 +47,7 @@ g = 1/np.sqrt(1-w**2)
pyplot.plot(w, g)
pyplot.xlabel(r'$\omega$'); pyplot.ylabel('$g(w)$')
pyplot.xticks([-1, 0, 1], [r'$-2\sqrt{\frac{k}{m}}$', 0, r'$2\sqrt{\frac{k}{m}}$'])
pyplot.yticks([0, 1], [0, r'$\frac{L}{2\pi a}\sqrt{\frac{\kappa}{m}}$'])
pyplot.hlines([1], -pi/2, 0, linestyles='dashed')
pyplot.yticks([0.5, 1], [0, r'$\frac{L}{2\pi a}\sqrt{\frac{\kappa}{m}}$'])
```
4.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment