From b669b60d6c74b4e2062bd2596742c234cdaa9482 Mon Sep 17 00:00:00 2001 From: daveabiy <dawitk27@gmail.com> Date: Fri, 16 Jul 2021 02:59:43 +0200 Subject: [PATCH] simple code for observing the solution --- val.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 val.py diff --git a/val.py b/val.py new file mode 100644 index 0000000..cac8631 --- /dev/null +++ b/val.py @@ -0,0 +1,39 @@ +# To add a new cell, type '# %%' +# To add a new markdown cell, type '# %% [markdown]' + +# %% +from matplotlib import pyplot as plt +import numpy as np + + +# %% +file = open("values.txt","r") + + +# %% +f = file.readline() +print(f) +niter = int(f) +g = [0]*niter +for i in range (0, niter): + g[i]= file.readline() + g[i]=float(g[i]) + +file.close() +print(g) + + + +# %% +p= np.arange(1,niter+1) +print(p) + + +# %% +plt.plot(p,g,'r-') + + +# %% + + + -- GitLab