From 87beaa2248ad43ea3bd3a9dda11b6e24558880b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gi=C3=B9=20Marcer?= Date: Thu, 23 Apr 2020 23:58:08 +0200 Subject: [PATCH] ex-4: created a program for plotting the expected distribution --- ex-4/note.py | 24 ++++++++++++++++++++++++ notes/images/expected.pdf | Bin 0 -> 15143 bytes 2 files changed, 24 insertions(+) create mode 100644 ex-4/note.py create mode 100644 notes/images/expected.pdf diff --git a/ex-4/note.py b/ex-4/note.py new file mode 100644 index 0000000..fa955c5 --- /dev/null +++ b/ex-4/note.py @@ -0,0 +1,24 @@ +import matplotlib.pyplot as plt +import numpy as np + +p_max = 10 + +def f(x): + return x * np.log(p_max/x)/np.arctan(np.sqrt(p_max**2/x**2 - 1)) + + +def main(): + x = np.arange(0, 10, 0.001) + y = f(x) + + plt.rcParams['font.size'] = 20 + plt.figure() + plt.title('Expected distribution', loc='right') + plt.ylabel('$\\langle |P_v| \\rangle$') + plt.xlabel('$P_h$') + plt.plot(x, y, c='#92182b') + plt.show() + + +if __name__ == '__main__': + main() diff --git a/notes/images/expected.pdf b/notes/images/expected.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5f1725355f733a478a2fb76daf7c0d5cc898bf98 GIT binary patch literal 15143 zcmeHucRbZ!{C`4pkq|P{B_s3h%Qdsf9#J2Zb&YH;DN%}wD0^jZT0)X+Sy_>kw3Nyo zC8NRbyss4H`}y@9kKgZ~@AWv&`+eSLyw2;q-skl^=RDs6`YLMTCeiExCn70Jrk%^of<4|Hi9Emh(3-sL_>AZG`KVNv~u-wxAG*q+8kf)`AUA!5JHD&>u9Cq z<_qeD8pEUU5?DBzASHp6f*R6?%8^#pW=QmM^Y*j>dW019Q;(2pVZWq?WLgzk&Cwa? z364;628vW6+PK*Qy=xO)?MV)B6f``BkoLVuoc!~Xr8I@I-DRhym#^rQ#eb`mGYl<86Q9T?H@OVrIS+MNWOD8M*lZM zZ4I+MWx2!(8NqY6(Gy#IPch^>IvU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