-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathstat.py
More file actions
45 lines (40 loc) · 803 Bytes
/
stat.py
File metadata and controls
45 lines (40 loc) · 803 Bytes
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
import numpy as np
import matplotlib.pyplot as plt
plt.grid()
plt.hist(nd, 10)
plt.figure(3)
plt.plot(ud)
plt.subplot(2,1,2)
plt.plot(nd)
plt.subplot(2,1,1)
plt.figure(100)
plt
np.size(np.where((ud>=-1) & (ud<=1)))
ud=np.random.uniform(-1,1,100)
np.random.uniform(-1,1,100)
np.size(np.where((nd>=-1) & (nd<=1)))
nd=np.random.randn(1000)
nd[1]
nd[0]
np.where((nd>=-1) & (nd<=1))
np.size(nd)
nd
nd=np.random.randn(100)
np.random.uniform(-1, 1, 10)
np.random.randn(10)
np.random.randn(3)
np.sqrt(np.var(a))
np.var(a)
np.sum(a)/np.size(a)
(a[0]+a[1]+a[2]+a[3])/4
a[0]
a=np.array([80, 70, 60, 90])
np.array([80, 70, 60, 90])
z=100+80/15*(55+80*9.81/15)*(1-np.exp(-(15/80)*t))-80*9.81/15*t
t=80/15*np.log(1+55*15/(80*9.81))
np.exp(1)**2
np.exp(2)
np.exp(1)
np.log(np.exp(1))
np.log10(10**2)
np.log10(10)