forked from SCKIMOSU/Numerical-Analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample1.py
More file actions
118 lines (113 loc) · 2.5 KB
/
Copy pathsample1.py
File metadata and controls
118 lines (113 loc) · 2.5 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
1 import tensorflow as tf
2 who
3 a[:4]
4 a[:3]
5 a[:2]
6 a
7 a=np.array([1, 2,3, 4,5, 6])
8 plt.ylim(0, 2)
9 plt.xlim(-0.1, 0.1)
10 plt.plot(x, y1+y2, 'p')
11 plt.figure(24)
12 np.sinh(0)
13 np.cosh(0)
14 plt.plot(x, y1-y2, '>')
15 plt.figure(23)
16 plt.plot(x, y2, 'x')
17 plt.figure(22)
18 y2
19 y2=np.exp(-x)/2
20 plt.plot(x,y1, 'o' )
21 plt.figure(21)
22 import matplotlib.pyplot as plt
23 1/np.exp(8)
24 np.exp(-8)
25 1/np.exp(1)
26 np.exp(-1)
27 np.exp(1)
28 np.exp(0)
29 y1
30 y1=np.exp(x)/2
31 x
32 x=np.arange(-8, 8+1, 1)
33 a[1]
34 a[0]
35 type(a)
36 a=np.array([1, 2, 3, 4], float)
37 import numpy as np
38 print('max is = ', maximum(3, 4))
39 print(3+4)
40 def maximum(x,y): ...
41 plt.plot(t1, y1+y2, 'o')
42 plt.figure(12)
43 plt.plot(t1, y2, '>')
44 plt.figure(11)
45 plt.figure(10)
46 plt.plot(t1, y1, 'o')
47 plt.show()
48 figure(1)
49 plt.figure(1)
50 y2=np.exp(-t1)/2
51 y1=np.exp(t1)/2
52 t1
53 t1=np.arange(-8, 8+1)
54 t1[0]
55 np.exp(t1[0])
56 plt.plot(t1, np.exp(t1), '-x')
57 plt.figure(4)
58 plt.plot(t, y1, 'o')
59 plt.figure(3)
60 y1=np.exp(t)
61 t
62 t=np.arange(0, 7+1)
63 np.exp(2)
64 print("max is = ", maximum(2,3))
65 plt.grid(True)
66 plt.plot(t, np.sinh(t), 'o')
67 t[0]
68 np.size(t)
69 t=np.arange(-2*np.pi, 2*np.pi, 0.05)
70 t=np.arange(-2*np.pi, 2*np.pi, 0.5)
71 plt.plot(t1, np.sin(t1), 'x')
72 plt.figure(2)
73 np.size(t1)
74 t1=np.arange(-2*np.pi, 2*np.pi, 0.01)
75 plt.plot(t,y1, 'o')
76 y1[0]
77 y[0]
78 t[1]
79 np.size(y1)
80 y1=np.sin(t)
81 t=np.arange(-5, 6)
82 t=np.arange(-5, 5)
83 t=np.arange(5)
84 window.mainloop()
85 label.pack()
87 lavel=Label(window, text="Hello World")
89 window-Tk()
90 from tkinter import *
91 t.forward(100)
92 t.right(90)
93 t.shape("turtle")
94 t=turtle.Pen()
95 import turtle
96 label=Label(window, text="Hello WOrld")
97 from tKinter import *
98 plt.plot(t1, y1)
99 y1=np.sin(t1)
100 t1=np.arange(-2*np.pi, 2*np.pi, 0.5)
101 plt.plot(t, y)
102 y[1]
103 np.size(y)
104 y
105 y=np.sin(t)
106 x=np.arange(-10, 10, 4)
107 np.size(x)
108 x=np.arange(-10, 10, 2)
109 t=np.arange(-2*np.pi, 2*np.pi, 0.01)
110 np.pi 111 np.arange(1, 5+1)
112 np.arange(1, 5)
113 y1=np.exp(-t)/2
114 y1=np.exp(t)/2
115 t=np.arange(-8,8)
116 import matplotlib.pyplo as plt