Skip to content
Snippets Groups Projects
Commit befa665e authored by daveabiy's avatar daveabiy
Browse files

contains analyzing tools for the output

parent 01371845
No related branches found
No related tags found
No related merge requests found
%% Cell type:code id: tags:
``` python
from matplotlib import pyplot as plt
import numpy as np
```
%% Cell type:code id: tags:
``` python
file = open("values.txt","r")
```
%% Cell type:code id: tags:
``` python
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)
```
%% Output
50
[1.0, 20.0, -9.0, 35.0, 36.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0]
%% Cell type:code id: tags:
``` python
p= np.arange(1,niter+1)
print(p)
```
%% Output
[ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
49 50]
%% Cell type:code id: tags:
``` python
plt.plot(p,g,'r-')
```
%% Output
[<matplotlib.lines.Line2D at 0x7fa77e7d8fd0>]
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
```
import torch
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
```
%% Cell type:code id: tags:
```
file = open("values.txt","r")
```
%% Cell type:code id: tags:
```
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)
```
%% Output
50
[1.0, 20.0, -9.0, 35.0, 36.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0, 40.0, 31.0, 30.0]
%% Cell type:code id: tags:
```
p= np.arange(1,niter+1)
print(p)
```
%% Output
[ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
49 50]
%% Cell type:code id: tags:
```
plt.plot(p,g,'r--')
# plt.figure(p,g,'r-')
```
%% Output
[<matplotlib.lines.Line2D at 0x7fc63df52d00>]
%% Cell type:code id: tags:
```
```
file/note 0 → 100644
This diff is collapsed.
50
1.000000
7.500000
14.000000
20.500000
27.000000
33.500000
40.000000
46.500000
50.000000
52.000000
51.000000
53.000000
54.000000
56.000000
56.500000
54.000000
58.000000
59.000000
59.750000
57.500000
60.000000
61.000000
61.250000
60.000000
63.000000
64.000000
65.000000
64.500000
66.250000
66.500000
67.500000
68.000000
68.000000
67.000000
69.000000
70.500000
71.750000
70.000000
72.500000
73.000000
74.250000
73.750000
74.250000
74.250000
73.500000
73.500000
74.750000
74.250000
73.250000
75.000000
119
1.000000
14.000000
23.192388
30.697942
37.197942
43.011718
48.318946
50.017883
51.432097
51.858711
52.132975
53.339020
54.493721
55.183282
54.680992
56.101394
56.963045
56.518242
57.960521
57.250495
58.778532
58.597525
58.921489
59.219825
59.160735
60.063206
60.641910
60.480771
60.407660
61.221969
61.766652
61.621957
62.090232
62.005947
62.289774
62.822624
63.322624
63.351392
63.813636
63.692018
63.981330
64.052447
64.306771
64.758897
65.211164
65.254338
65.656700
65.552168
65.832810
65.895850
66.128574
66.520098
66.936123
66.990426
67.346857
67.255628
67.529747
67.586644
67.802681
68.146550
68.533848
68.597082
68.916838
68.836346
69.105334
69.157359
69.360006
69.665130
70.028933
70.099537
70.389136
70.317544
70.582362
70.630403
70.821999
71.094818
71.438941
71.515762
71.779993
71.715935
71.977278
72.021983
72.204258
72.449605
72.776932
72.859088
73.101594
73.044021
73.302412
73.344272
73.518546
73.740158
74.052930
74.139731
74.363358
74.311443
74.567287
74.606682
74.773198
75.067534
75.167534
75.186059
75.076183
75.187023
75.274199
75.183848
75.084716
75.188869
75.381319
75.186154
75.006249
75.243921
75.095617
75.151806
75.098925
75.155071
75.102147
75.158252
75.105288
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment