Python Speed Learning

Size: px
Start display at page:

Download "Python Speed Learning"

Transcription

1 Python Speed Learning 1 / 89

2 (import) (for) (if) ( ) for 13 2 / 89

3 Contents (import) (for) (if) ( ) for 13 3 / 89

4 (def) (for) (if) etc. 1 4 / 89

5 Jupyter Python ( ) Shift + Enter ( ) ( ) ( ) 1 5 / 89

6 : / 89

7 Contents (import) (for) (if) ( ) for 13 7 / 89

8 : * ** 6 # = ** 1234 # = / 89

9 1 13 % = == 1 1 == 2 2 False 1 3 < 4 2 True 1 5 >= 6 2 False 1 7 <= 8 and 9 == True 1 7 > 8 or 9!= False 1 10 < 11 < 12 2 True True 1 (False 0) 1 True / 89

10 Contents (import) (for) (if) ( ) for / 89

11 Python ( : 1 abs(-2) float(3) int(4.5) min(10,20,30,40) (abs(-2) + float(3)) / max(50,60,70,80,90) / 89

12 print : : 1 print(1 + 2) 2 print(7 / 3) 3 print(10 < 11 < 12) True 12 / 89

13 Contents (import) (for) (if) ( ) for / 89

14 (import) 1 sin(1.0) 2 (most recent call last): 3 File "<stdin>", line 1, in <module> 4 name sin is not defined ( ) (import) 1 import math # math import 1 math.sin(1.0) # / 89

15 math sin, cos, tan, π, e, exp, log,... 1 math.sin(1.5) math.cos(1.5) math.pi math.sin(math.pi) e-16 1 math.e math.exp(1.0) math.log(math.e) math.log(81, 3) / 89

16 Python visual, matplotlib, numpy, scipy ( ) Google : python math Python : 16 / 89

17 Python dir: 1 dir(math) 2 [... cos, cosh,... ] help: 1 help(math.sin) 2 Help on built-in function sin in module math: 3 4 sin(x) 5 6 Return the sine of x (measured in radians). 1 help(math) 2 math 17 / 89

18 import : 1 import math 2 math.sin(1.0) : 1 import numpy as np 2 np.array([1,2,3]) + 1 from math import sin,cos,log 2 log(sin(1.0)**2 + cos(1.0)**2) + 1 from visual import * 2 vector(1,2,3) 18 / 89

19 Contents (import) (for) (if) ( ) for / 89

20 Python ( ) ( ) : 1 c = math.cos(1.0) # c ( ) 1 c s = math.sin(1.0) 1 c ** 2 + s ** 2 # / 89

21 1 x = 3 2 x = 4 3 x 4 4 x = x x = 4 2 x = x + 1 # x = x / 89

22 Contents (import) (for) (if) ( ) for / 89

23 : 1 def f(x, y): # f 2 return x ** 2 + y ** 2 1 f(3, 4) # x=3, y=4 f ( ) / 89

24 : : a, b, c b + b 2 4ac 2a solve q: 1: 1 def solve_q(a, b, c): 2 return (-b + math.sqrt(b*b - 4*a*c)) / (2*a) 2: 1 def solve_q(a, b, c): 2 D = b * b - 4 * a * c 3 return (-b + math.sqrt(d)) / (2 * a) 24 / 89

25 / 89

26 (e.g., f(a)) f return E E f(a) f 1 def f(x): 2 return x return x + 2 # 1 f(3) / 89

27 : return None 1 def f(x): 2 x + 1 # return 1 f(4) # ( None ) 1 f(4) + 2 # None Traceback (most recent call last): 3 File "<stdin>", line 1, in <module> 4 TypeError: unsupported operand type(s) for +: NoneType and int 27 / 89

28 (1) 1 ::= 2 def f(x, y, ): ( ) : 1 ::= 2 return # return 3 x = # 4 import m # import 5 # 6 # 28 / 89

29 (2) ( ) 1 ::= 2 # x # 4 # # -3 6 (,, ) # abs(-3) 7. x # math.sin 8 ( ) f, x, m (A-Z, a-z) ( ) (0-9) OK: x, y, sin, my func, Masahiro Tanaka 19 NG: x, 1st attempt, Masahiro Tanaka / 89

30 (1) 1 def f(x): 2 return 3 * x * x * x * x * x * x * x 4 File "<...>", line * x * x * x 6 ˆ 7 IndentationError: unexpected indent def f(x) (:)! 1 def f(x) 2 return x ** File "<...>", line 1 5 def f(x) 6 ˆ 7 SyntaxError: invalid syntax 30 / 89

31 (2) ; 1 def f(x): 2 y = x return y * y 4 f(10) f(10) ( ) 1 def f(x): 2 y = x z = y * y 4 return z ** 2 5 File "<...>", line 3 6 z = y * y 7 ˆ 8 IndentationError: unexpected indent ( (:) ) 31 / 89

32 Contents (import) (for) (if) ( ) for / 89

33 (, return ) ( ) for if 1 ::= 2 return # return 3 x = # 4 import m # import 5 # 6 # 7 for 8 if 33 / 89

34 : for : : 1 for x in range(e 0,E 1): E 0, E 1 ( E 1 E 0 ): 1 E 0, E 1 ( a, b ) 2 x = a 3 x = a x = b 1 E 1 range(e) range(0, E) ( E ) 34 / 89

35 ( ) for 0 n 1 1 def print_i(n): 2 for i in range(n): 3 print(i) 4 5 print_i(10) : print(..) print Jupyter 35 / 89

36 for for for, for 1 def print_ij(n): 2 for i in range(0, n): 3 for j in range(10, 10 + n): 4 print(i, j) 5 6 print_ij(3) / 89

37 for n 1 n : n k 2 = n 2 k=1 1 def sum_k2(n): 2 s = 0 3 for k in range(1, n+1): 4 s = s + k * k 5 return s 6 7 sum_k2(10) / 89

38 for 1 def sum_k2(n): 2 s = 0 3 for k in range(1, n+1): 4 s = s + k * k 5 return s sum k(10) : 1 s = 0 2 s = s + 1 * 1 # s = 1 3 s = s + 2 * 2 # s = 5 4 s = s + 3 * 3 # s = s = s + 10 * 10 # s = return s 38 / 89

39 for 1 def sum_k2(n): 2 for k in range(1, n+1): 3 s = s + k * k 4 return s 5 6 sum_k2(3) UnboundLocalError Traceback (most recent call last) 3 <ipython-input-6-bb13f487ff09> in <module>() > 1 sum k2(3) 5 6 <ipython-input-5-0e7b0b967ad8> in sum_k2(n) 7 1 def sum_k2(n): 8 2 for k in range(1, n+1): > 3 s = s + k * k 10 4 return s UnboundLocalError: local variable s referenced before assignment 39 / 89

40 1 sum k2(3) 2 1 for k in range(1, 4): 2 s = s + k * k 3 1 s = s + 1 * 1 4 ( )s ( ) 1 s = s + 1 * def f(x): 2 return y 3 4 f(3) 40 / 89

41 ( )., ( ) ( ) 1 UnboundLocalError: local variable s referenced before assignment 2 ( s ) ( ---->) > 3 s = s + k * k > 1 sum_k2(3) sum k2(3), for, s = s + k * k, s 41 / 89

42 (for ) for ( s), (s =... s... ), for? ( )NG: 1 for... 2 s =... s... : 1 s =... 2 for... 3 s =... s / 89

43 for (1) 1: : n 2 s = 0 s = s (= 1) s = s (= 5) s = s (= 14) s = s + n 2 ( k 1 n s = s + k 2 ) 1 s = 0 2 for k in range(1, n+1): 3 s = s + k * k 43 / 89

44 for (2) 1 s = c 2 for i in range(0, n): 3 s = f(s) s { s0 = c, s i+1 = f(s i ) s n for : 44 / 89

45 for (2 ) : s n = n 2 1 s = 0 2 for i in range(0, n): 3 s = s + (i + 1) ** 2 s 0 = 0 s i+1 = s i + (i + 1) 2 45 / 89

46 : if : 1 if : else: : 1 2 else: else: else: ( ) 46 / 89

47 if (1) 1 def smaller(x, y): 2 if x < y: 3 return x 4 else: 5 return y def nabeatsu(): 2 for i in range(50): 3 if i % 3 == 0 or 30 <= i < 40: 4 print(i) 47 / 89

48 if (2) (n 2,, (n 1) ) 1 def prime(n): 2 if n == 1: 3 return 0 4 for i in range(2, n): 5 if n % i == 0: 6 return 0 # 7 return 1 n 1 1 def count_prime(n): 2 c = 0 3 for i in range(1, n): 4 if prime(i): 5 c = c return c if 0 48 / 89

49 3 if : 1 if : 2 3 elif : 4 5 elif : else: 9 elif (else if ) else: ( ) 49 / 89

50 break, continue, pass 1 ::= 2 return # return 3 x = # 4 import m # import 5 # 6 # 7 for 8 if 9 break 10 continue 11 pass 50 / 89

51 break, continue, pass break for ( ) 1 for i in range(1, 8): 2 if i % 3 == 0: 3 break 4 print i continue for 1 for i in range(1, 8): 2 if i % 3 == 0: 3 continue 4 print(i) / 89

52 Contents (import) (for) (if) ( ) for / 89

53 ,, ? (e.g.,,,,,,... ),, Python (compound) ( ) 53 / 89

54 roadmap matplotlib グラフのプロット python ベクトル, 行列, 場, 偏微分方程式 visual python python 少数物体のアニメーション Σ, 積分, 常微分方程式,... numpy リスト, 配列, オブジェクト... 一つの名前で一杯 /n 個のデータ 繰り返し ( 再帰呼び出し ) 一つの文で一杯 /n 回計算 変数, 関数,etc. 54 / 89

55 Contents (import) (for) (if) ( ) for / 89

56 ( ): 1 ::= 2 3 x [,,..., ] : ( ) 56 / 89

57 : 1 import math 2 x = 20 3 a = [ 1, 1+2, math.cos(0.0), x ] 1 a 2 [1, 3, 1.0, 20] 1 len(a) a + [1.2, 3.4] 2 [1, 3, 1.0, 20, 1.2, 3.4] 1 [ a, a, a ] 2 [[1, 3, 1.0, 20], [1, 3, 1.0, 20], [1, 3, 1.0, 20]] 57 / 89

58 :,,,,,, 1 def f(l): 2 return l[0] 3 4 f([1,2,3]) / 89

59 ,, 1 a = [ 2, 3, 5 ] 2 a.append(7) # 3 a 4 [2, 3, 5, 7], (for) 1 a = [] 2 for i in range(0, 10000): 3 a.append(i) 4 a 5 [0, 1, 2,..., 9999] 59 / 89

60 ,, ( ) 1 a[2] = 50 2 a 3 [2, 3, 50, 7] ( ) 1 del a[1] # a[1]. 2 a 3 [2, 50, 7] 60 / 89

61 ,, 1 b = [ a, a, a ] 2 b 3 [[2, 50, 7], [2, 50, 7], [2, 50, 7]] 1 a[2] = 30 # 2 b 3 [[2, 30, 7], [2, 30, 7], [2, 30, 7]] 1 dir(a) #? 2 [... append, count, extend, index, insert, pop, remove, reverse, sort ] 3 help(a.reverse) / 89

62 for : 1 ::= 2 3 [,,..., ] 4 [ for in range(, ) ] for ( ) : [ E for in range(, ) ] 1 for in range(, ): 2 E E 62 / 89

63 : 1 [ x * x for x in range(0, 5) ] 2 [0, 1, 4, 9, 16] 1 sum([ x * x for x in range(0, 5) ]) 2 30 (sum ) 1 s = [] 2 for x in range(0, 5): 3 s.append(x * x) 1 s = [] 2 for x in range(0, 5): 3 s += x * x ( : s += E s = s + E ) 63 / 89

64 Contents (import) (for) (if) ( ) for / 89

65 : 1 ::= 2 3,,...,, 1 (,,..., ) :!, len(...) ( )...[...] ( ) ( ) 65 / 89

66 ,,, 1 a = (1.1, 2.2, 3.3) 2 a.append(4.4) # NG 3 del a[1] # NG 4 a[1] = 22 # NG 5 a = (4.4, 5.5) # OK 6 a = a + (6.6, 7.7) # OK 2,? 66 / 89

67 1 def polar(x, y): 2 r = sqrt(x * x + y * y) 3 theta = atan2(y, x) 4 return (r,theta) :. (= ) 1 r,theta = polor(3, 4)? OK... 1 [a0,a1,a2] = range(3,6) # a0=3, a1=4, a2=5 67 / 89

68 Contents (import) (for) (if) ( ) for / 89

69 : 1 ::= 2 3 "... " """... """ 6....? ",. a = "Hi!", said he. b = "Obama s speech" 3 (""", ),, len(...)...[...] / 89

70 : ( ) x, 1 print(x),, 1 print("x = %s" % x) 1 import math 2 y = math.cos(3.14) 3 print("cos(3.14) = %s" % y) 4 cos(3.14) = / 89

71 : 2 2, % 1 import math 2 x = print("exp(%s) = %s" % (x, math.exp(x))) 4 exp(2.3) = / 89

72 :, 1 1 % 2, 1, 1 i %s, 2 i %s,, %s... %d : %9d :. 9 9 %f : %.3f :., 3 72 / 89

73 (1) Python,,, (visual vector, numpy ), Python 5 73 / 89

74 (2) Python,,, (, ),,, +, len, [...] numpy Visual Python vector, 74 / 89

75 Contents (import) (for) (if) ( ) for / 89

76 for for 1 for in range(, ): : 1 for in : ,, range(a, b),,,, (,, )..., range(a, b) [ a, a + 1,...b 1 ] 76 / 89

77 for : 1 for x in [ 2, 3, 5 ]: 2 print(x) 3 for x in "hello": 4 print(x) h 9 e 10 l 11 l 12 o 77 / 89

78 1 A = [ (0,1), (2,3), (4, 5) ] 2 for x,y in A: 3 print(x + y) x,y = 78 / 89

79 zip :, zip(x, Y ) for 1 X = [ 1, 2, 3 ] 2 Y = [ 1, 4, 9 ] 3 zip(x, Y) 4 [ (1,1), (2,4), (3,9) ] 1 for x,y in zip(x, Y): 2 print(x + y) / 89

80 enumerate : enumerate(l) ( ; 0, 1, 2,... ) 1 def find_space(s): 2 for i,c in enumerate(s): 3 if c == : 4 return i 5 return find_space("hello world") / 89

81 Contents (import) (for) (if) ( ) for / 89

82 : Python,, etc. (class) 82 / 89

83 (1) Visual Python vector, sphere, arrow,... ( ) numpy 1 ( ) 1 a.append(x) 2 ( ) 1 c.pos = vector(1,2,3) 3 c.x 1 print(c.x) 83 / 89

84 : vector, sphere, 1 class nothing: 2 pass # 3 # nothing 4 m = nothing() 5 # ( ) 6 m.x = 10 7 m.y = 20 8 # 9 print(m.x + m.y) 10 # 11 def take_nothing(n): 12 n.x = n.x take_nothing(m) 15 print(m.x) 84 / 89

85 (2) (vector,,,...) =, ( ) a + b 1 ( +,,, etc. ) 2 85 / 89

86 , class : append 1 import random 2 from vpython import curve,vector 3 def rnd(): 4 return random.random() 5 l = [] 6 c = curve() 7 for i in range(10): 8 l.append(vector(rnd(), rnd(), rnd())) 9 for i in range(10): 10 c.append(vector(rnd(), rnd(), rnd())) 86 / 89

87 + 1 from visual import * # vector 2 import numpy as np # array 3 print(1 + 2) # 4 print([1,2,3] + [4,5,6]) # 5 print(vector(1,2,3) + vector(4,5,6)) # 6 print(np.array([1,2,3]) + np.array([4,5,6])) # 87 / 89

88 + 1 from visual import * # vector 2 import numpy as np # array 3 print(1 + 2) # 4 print([1,2,3] + [4,5,6]) # 5 print(vector(1,2,3) + vector(4,5,6)) # 6 print(np.array([1,2,3]) + np.array([4,5,6])) # [1,2,3,4,5,6] 3 <5, 7, 9> 4 [5 7 9] 87 / 89

89 * 1 from visual import * # vector 2 import numpy as np # array 3 print(3 * 4) # 4 print([1,2,3] * 5) # 5 print(vector(1,2,3) * 10) # 6 print(100 * vector(1,2,3)) # 7 print(np.array([1,2,3]) * 1000) # 8 print(10000 * np.array([1,2,3])) # 88 / 89

90 * 1 from visual import * # vector 2 import numpy as np # array 3 print(3 * 4) # 4 print([1,2,3] * 5) # 5 print(vector(1,2,3) * 10) # 6 print(100 * vector(1,2,3)) # 7 print(np.array([1,2,3]) * 1000) # 8 print(10000 * np.array([1,2,3])) # [1,2,3,1,2,3,1,2,3,1,2,3,1,2,3] 3 <10, 20, 30> 4 <100, 200, 300> 5 [ ] 6 [ ] 88 / 89

91 ** 1 from visual import * # vector 2 import numpy as np # array 3 print(3 ** 4) # print([1,2,3] ** 20) # 5 print(vector(1,2,3) ** 100) # 6 print(np.array([1,2,3]) ** 4) # 4 89 / 89

92 ** 1 from visual import * # vector 2 import numpy as np # array 3 print(3 ** 4) # print([1,2,3] ** 20) # 5 print(vector(1,2,3) ** 100) # 6 print(np.array([1,2,3]) ** 4) # # 3 # 4 [ ] 89 / 89

Python Speed Learning

Python   Speed Learning Python Speed Learning 1 / 76 Python 2 1 $ python 1 >>> 1 + 2 2 3 2 / 76 print : 1 print : ( ) 3 / 76 print : 1 print 1 2 print hello 3 print 1+2 4 print 7/3 5 print abs(-5*4) 4 / 76 print : 1 print 1 2

More information

listings-ext

listings-ext (6) Python (2) ( ) ohsaki@kwansei.ac.jp 5 Python (2) 1 5.1 (statement)........................... 1 5.2 (scope)......................... 11 5.3 (subroutine).................... 14 5 Python (2) Python 5.1

More information

Visual Python, Numpy, Matplotlib

Visual Python, Numpy, Matplotlib Visual Python, Numpy, Matplotlib 1 / 38 Contents 1 2 Visual Python 3 Numpy Scipy 4 Scipy 5 Matplotlib 2 / 38 Contents 1 2 Visual Python 3 Numpy Scipy 4 Scipy 5 Matplotlib 3 / 38 3 Visual Python: 3D Numpy,

More information

Visual Python, Numpy, Matplotlib

Visual Python, Numpy, Matplotlib Visual Python, Numpy, Matplotlib 1 / 57 Contents 1 2 Visual Python 3 Numpy Scipy 4 Scipy 5 Matplotlib 2 / 57 Contents 1 2 Visual Python 3 Numpy Scipy 4 Scipy 5 Matplotlib 3 / 57 3 Visual Python: 3D Numpy,

More information

or a 3-1a (0 b ) : max: a b a > b result a result b ( ) result Python : def max(a, b): if a > b: result = a else: result = b ret

or a 3-1a (0 b ) : max: a b a > b result a result b ( ) result Python : def max(a, b): if a > b: result = a else: result = b ret 4 2018.10.18 or 1 1.1 3-1a 3-1a (0 b ) : max: a b a > b result a result b result Python : def max(a, b): if a > b: result = a result = b return(result) : max2: a b result a b > result result b result 1

More information

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション アルゴリズム設計 5 月 18 日 Agenda 諸注意 Pythonの心得 エラー処理 クラス 諸注意 諸注意 提出前に必ず実行してください! エラーがある場合はコメントアウト等, 実行されないように 関数名指定にも関わらず, 自分で関数名を決めている どの問題なのか分からなくなるので, 決められた名前を使ってください 関数をクォーテーションで囲んでいる 定義しただけでは実行されないので, クォーテーションで囲む意味はありません.

More information

PowerPoint Presentation

PowerPoint Presentation 知能システム論 1 (3) 2009.4.21 情報システム学研究科情報メディアシステム学専攻知能システム学講座末廣尚士 - 講義資料の HP http://www.taka.is.uec.ac.jp/ から右のメニューの class をクリック または http://www.taka.is.uec.ac.jp/class200 9/class2009.html を直接入力 2. Python 入門

More information

永和システムマネジメント SP 安井力 東京支社 Python 勉強会実習資料 2005/12/28 この資料の使い方最初から順に試してください 初心者は 書かれたとおり入力して ほかにも似た例を試してみてください 初級者は 書かれたとおり入力して なぜそれで動くのか調べてください 中級者は 設問か

永和システムマネジメント SP 安井力 東京支社 Python 勉強会実習資料 2005/12/28 この資料の使い方最初から順に試してください 初心者は 書かれたとおり入力して ほかにも似た例を試してみてください 初級者は 書かれたとおり入力して なぜそれで動くのか調べてください 中級者は 設問か この資料の使い方最初から順に試してください 初心者は 書かれたとおり入力して ほかにも似た例を試してみてください 初級者は 書かれたとおり入力して なぜそれで動くのか調べてください 中級者は 設問から解答を考えてください 根性 問題も挑戦してください 上級者は 根性 問題も含めて この資料の改善をしてください 根性 問題は やる気と ( 多少の ) 知識がある人に挑戦して欲しいものです 1. 起動と実行

More information

num2.dvi

num2.dvi kanenko@mbk.nifty.com http://kanenko.a.la9.jp/ 16 32...... h 0 h = ε () 0 ( ) 0 1 IEEE754 (ieee754.c Kerosoft Ltd.!) 1 2 : OS! : WindowsXP ( ) : X Window xcalc.. (,.) C double 10,??? 3 :, ( ) : BASIC,

More information

Windows (L): D:\jyugyou\ D:\jyugyou\ D:\jyugyou\ (N): en2 OK 2

Windows (L): D:\jyugyou\ D:\jyugyou\ D:\jyugyou\ (N): en2 OK 2 Windows C++ Microsoft Visual Studio 2010 C++ Microsoft C++ Microsoft Visual Studio 2010 Microsoft Visual Studio 2010 C++ C C++ Microsoft Visual Studio 2010 Professional Professional 1 Professional Professional

More information

1 6/13 2 6/20 3 6/27 4 7/4 5 7/11 6 7/18 N 7 7/25 Warshall-Floyd, Bellman-Ford, Dijkstra TSP DP, 8/1 2 / 36

1 6/13 2 6/20 3 6/27 4 7/4 5 7/11 6 7/18 N 7 7/25 Warshall-Floyd, Bellman-Ford, Dijkstra TSP DP, 8/1 2 / 36 3 2016 6 27 1 / 36 1 6/13 2 6/20 3 6/27 4 7/4 5 7/11 6 7/18 N 7 7/25 Warshall-Floyd, Bellman-Ford, Dijkstra TSP DP, 8/1 2 / 36 1 2 3 3 / 36 4 / 36 os.urandom(n) n >>> import os >>> r = os.urandom(4) #

More information

コンピュータ概論

コンピュータ概論 4.1 For Check Point 1. For 2. 4.1.1 For (For) For = To Step (Next) 4.1.1 Next 4.1.1 4.1.2 1 i 10 For Next Cells(i,1) Cells(1, 1) Cells(2, 1) Cells(10, 1) 4.1.2 50 1. 2 1 10 3. 0 360 10 sin() 4.1.2 For

More information

1 matplotlib matplotlib Python matplotlib numpy matplotlib Installing A 2 pyplot matplotlib 1 matplotlib.pyplot matplotlib.pyplot plt import import nu

1 matplotlib matplotlib Python matplotlib numpy matplotlib Installing A 2 pyplot matplotlib 1 matplotlib.pyplot matplotlib.pyplot plt import import nu Python Matplotlib 2016 ver.0.06 matplotlib python 2 3 (ffmpeg ) Excel matplotlib matplotlib doc PDF 2,800 python matplotlib matplotlib matplotlib Gallery Matplotlib Examples 1 matplotlib 2 2 pyplot 2 2.1

More information

Boo Boo 2 Boo 2.NET Framework SDK 2 Subversion 2 2 Java 4 NAnt 5 Boo 5 5 Boo if 11 for 11 range 12 break continue 13 pass

Boo Boo 2 Boo 2.NET Framework SDK 2 Subversion 2 2 Java 4 NAnt 5 Boo 5 5 Boo if 11 for 11 range 12 break continue 13 pass Boo Boo 2 Boo 2.NET Framework SDK 2 Subversion 2 2 Java 4 NAnt 5 Boo 5 5 Boo 6 6 7 9 10 11 if 11 for 11 range 12 break continue 13 pass 13 13 14 15 15 23 23 24 24 24 25 import 26 27-1- Boo Boo Python CLI.NET

More information

(Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1

(Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1 (Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1 17 Fortran Formular Tranlator Lapack Fortran FORTRAN, FORTRAN66, FORTRAN77, FORTRAN90, FORTRAN95 17.1 A Z ( ) 0 9, _, =, +, -, *,

More information

listings-ext

listings-ext (10) (2) ( ) ohsaki@kwansei.ac.jp 8 (2) 1 8.1.............................. 1 8.2 mobility.fixed.......................... 2 8.3 mobility.randomwalk...................... 7 8.4 mobility.randomwaypoint...................

More information

Ruby Ruby ruby Ruby G: Ruby>ruby Ks sample1.rb G: Ruby> irb (interactive Ruby) G: Ruby>irb -Ks irb(main):001:0> print( ) 44=>

Ruby Ruby ruby Ruby G: Ruby>ruby Ks sample1.rb G: Ruby> irb (interactive Ruby) G: Ruby>irb -Ks irb(main):001:0> print( ) 44=> Ruby Ruby 200779 ruby Ruby G: Ruby>ruby Ks sample1.rb G: Ruby> irb (interactive Ruby) G: Ruby>irb -Ks irb(main):001:0> print( 2+3+4+5+6+7+8+9 ) 44 irb(main):002:0> irb irb(main):001:0> 1+2+3+4 => 10 irb(main):002:0>

More information

Windows [ ] [ (R)..] cmd [OK] Z:\> mkdir progi [Enter] \ ) mkdir progi ) (command ) help [Enter] help ( help ) mkdir make directory Windows ) mkdir mk

Windows [ ] [ (R)..] cmd [OK] Z:\> mkdir progi [Enter] \ ) mkdir progi ) (command ) help [Enter] help ( help ) mkdir make directory Windows ) mkdir mk Ruby I I 1 Windows 1 Meadow 1: Meadow I Meadow 2 2 Ruby 2.1 I Z progi 1 Windows [ ] [ (R)..] cmd [OK] Z:\> mkdir progi [Enter] \ ) mkdir progi ) (command ) help [Enter] help ( help ) mkdir make directory

More information

応用数学特論.dvi

応用数学特論.dvi 1 1 1.1.1 ( ). P,Q,R,.... 2+3=5 2 1.1.2 ( ). P T (true) F (false) T F P P T P. T 2 F 1.1.3 ( ). 2 P Q P Q P Q P Q P or Q P Q P Q P Q T T T T F T F T T F F F. P = 5 4 Q = 3 2 P Q = 5 4 3 2 P F Q T P Q T

More information

2015 I ( TA)

2015 I ( TA) 2015 I ( TA) Schrödinger PDE Python u(t, x) x t 2 u(x, t) = k u(t, x) t x2 k k = i h 2m Schrödinger h m 1 ψ(x, t) i h ( 1 ψ(x, t) = i h ) 2 ψ(x, t) t 2m x Cauchy x : x Fourier x x Fourier 2 u(x, t) = k

More information

Python (Anaconda ) Anaconda 2 3 Python Python IDLE Python NumPy 6

Python (Anaconda ) Anaconda 2 3 Python Python IDLE Python NumPy 6 Python (Anaconda ) 2017. 05. 30. 1 1 2 Anaconda 2 3 Python 3 3.1 Python.......................... 3 3.2 IDLE Python....................... 5 4 NumPy 6 5 matplotlib 7 5.1..................................

More information

Excel ではじめる数値解析 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 初版 1 刷発行時のものです.

Excel ではじめる数値解析 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます.   このサンプルページの内容は, 初版 1 刷発行時のものです. Excel ではじめる数値解析 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. http://www.morikita.co.jp/books/mid/009631 このサンプルページの内容は, 初版 1 刷発行時のものです. Excel URL http://www.morikita.co.jp/books/mid/009631 i Microsoft Windows

More information

Python @HACHINONE 10 1 V Python 2014 2 : L[i] # -*- coding: utf-8 -*- def search(l, e): """L をリスト e をオブジェクトとする L に e が含まれていれば True そうでなければ False を返す """ for i in range(len(l)): if L[i] == e: return True

More information

nakao

nakao Fortran+Python 4 Fortran, 2018 12 12 !2 Python!3 Python 2018 IEEE spectrum https://spectrum.ieee.org/static/interactive-the-top-programming-languages-2018!4 Python print("hello World!") if x == 10: print

More information

GraphicsWithPlotFull.nb Plot[{( 1), ( ),...}, {( ), ( ), ( )}] Plot Plot Cos x Sin x, x, 5 Π, 5 Π, AxesLabel x, y x 1 Plot AxesLabel

GraphicsWithPlotFull.nb Plot[{( 1), ( ),...}, {( ), ( ), ( )}] Plot Plot Cos x Sin x, x, 5 Π, 5 Π, AxesLabel x, y x 1 Plot AxesLabel http://yktlab.cis.k.hosei.ac.jp/wiki/ 1(Plot) f x x x 1 1 x x ( )[( 1)_, ( )_, ( 3)_,...]=( ) Plot Plot f x, x, 5, 3 15 10 5 Plot[( ), {( ), ( ), ( )}] D g x x 3 x 3 Plot f x, g x, x, 10, 8 00 100 10 5

More information

JEB Plugin 開発チュートリアル 第4回

JEB Plugin 開発チュートリアル 第4回 Japan Computer Emergency Response Team Coordination Center 電子署名者 : Japan Computer Emergency Response Team Coordination Center DN : c=jp, st=tokyo, l=chiyoda-ku, email=office@jpcert.or.jp, o=japan Computer

More information

復習 プログラミング 1 ( 第 4 回 ) 関数の利用 2 ループ処理 (while 文 ) 1. Chapter の補足 2 1. 関数とローカル変数 2. Chapter 3.1 の補足 1. Iteration, looping ( 反復処理 ) 2. ループ処理の例 実行例 3

復習 プログラミング 1 ( 第 4 回 ) 関数の利用 2 ループ処理 (while 文 ) 1. Chapter の補足 2 1. 関数とローカル変数 2. Chapter 3.1 の補足 1. Iteration, looping ( 反復処理 ) 2. ループ処理の例 実行例 3 復習 プログラミング 1 ( 第 4 回 ) 関数の利用 2 ループ処理 (while 文 ) 1. Chapter 4.1.1 の補足 2 1. 関数とローカル変数 2. Chapter 3.1 の補足 1. Iteration, looping ( 反復処理 ) 2. ループ処理の例 実行例 3. 3 種類の処理流れ制御 3. 演習 4. 宿題 処理の流れは逐次 条件分岐 反復処理の 3 タイプのみ

More information

, 1 ( f n (x))dx d dx ( f n (x)) 1 f n (x)dx d dx f n(x) lim f n (x) = [, 1] x f n (x) = n x x 1 f n (x) = x f n (x) = x 1 x n n f n(x) = [, 1] f n (x

, 1 ( f n (x))dx d dx ( f n (x)) 1 f n (x)dx d dx f n(x) lim f n (x) = [, 1] x f n (x) = n x x 1 f n (x) = x f n (x) = x 1 x n n f n(x) = [, 1] f n (x 1 1.1 4n 2 x, x 1 2n f n (x) = 4n 2 ( 1 x), 1 x 1 n 2n n, 1 x n n 1 1 f n (x)dx = 1, n = 1, 2,.. 1 lim 1 lim 1 f n (x)dx = 1 lim f n(x) = ( lim f n (x))dx = f n (x)dx 1 ( lim f n (x))dx d dx ( lim f d

More information

1 VisBAR edu H 2 O.....

1 VisBAR edu H 2 O..... VisBAR edu v1.03 ( ) 25 4 22 1 VisBAR edu 1 1.1....................................................... 1 1.2.................................................. 2 2 3 2.1 H 2 O.........................................

More information

Excel97関数編

Excel97関数編 Excel97 SUM Microsoft Excel 97... 1... 1... 1... 2... 3... 3... 4... 5... 6... 6... 7 SUM... 8... 11 Microsoft Excel 97 AVERAGE MIN MAX SUM IF 2 RANK TODAY ROUND COUNT INT VLOOKUP 1/15 Excel A B C A B

More information

all.dvi

all.dvi fortran 1996 4 18 2007 6 11 2012 11 12 1 3 1.1..................................... 3 1.2.............................. 3 2 fortran I 5 2.1 write................................ 5 2.2.................................

More information

fx-3650P_fx-3950P_J

fx-3650P_fx-3950P_J SA1109-E J fx-3650p fx-3950p http://edu.casio.jp RCA500002-001V04 AB2 Mode

More information

piyo0704a.rtfd

piyo0704a.rtfd す ここで中核となるのは 組み込み関数 eval および compile です 1 コードを実行するだけなら Python/Jython で記述したコードを実行するためのツール作りに着手します >>> compile("3+4", "(*.*", "eval" >>> eval(compile("3+4",

More information

[ 1] 1 Hello World!! 1 #include <s t d i o. h> 2 3 int main ( ) { 4 5 p r i n t f ( H e l l o World!! \ n ) ; 6 7 return 0 ; 8 } 1:

[ 1] 1 Hello World!! 1 #include <s t d i o. h> 2 3 int main ( ) { 4 5 p r i n t f ( H e l l o World!! \ n ) ; 6 7 return 0 ; 8 } 1: 005 9 7 1 1.1 1 Hello World!! 5 p r i n t f ( H e l l o World!! \ n ) ; 7 return 0 ; 8 } 1: 1 [ ] Hello World!! from Akita National College of Technology. 1 : 5 p r i n t f ( H e l l o World!! \ n ) ;

More information

Python ( ) Anaconda 2 3 Python Python IDLE Python NumPy 6 5 matpl

Python ( ) Anaconda 2 3 Python Python IDLE Python NumPy 6 5 matpl Python ( ) 2017. 11. 21. 1 1 2 Anaconda 2 3 Python 3 3.1 Python.......................... 3 3.2 IDLE Python....................... 5 4 NumPy 6 5 matplotlib 7 5.1.................................. 7 5.2..................................

More information

(1) θ a = 5(cm) θ c = 4(cm) b = 3(cm) (2) ABC A A BC AD 10cm BC B D C 99 (1) A B 10m O AOB 37 sin 37 = cos 37 = tan 37

(1) θ a = 5(cm) θ c = 4(cm) b = 3(cm) (2) ABC A A BC AD 10cm BC B D C 99 (1) A B 10m O AOB 37 sin 37 = cos 37 = tan 37 4. 98 () θ a = 5(cm) θ c = 4(cm) b = (cm) () D 0cm 0 60 D 99 () 0m O O 7 sin 7 = 0.60 cos 7 = 0.799 tan 7 = 0.754 () xkm km R km 00 () θ cos θ = sin θ = () θ sin θ = 4 tan θ = () 0 < x < 90 tan x = 4 sin

More information

RL_tutorial

RL_tutorial )! " = $ % & ' "(& &*+ = ' " + %' "(- + %. ' "(. + γ γ=0! " = $ " γ=0.9! " = $ " + 0.9$ " + 0.81$ "+, + ! " #, % #! " #, % # + (( + #,- +. max 2 3! " #,-, % 4! " #, % # ) α ! " #, % ' ( )(#, %)!

More information

cards.gif from Tkinter import * root = Tk() c0 = Canvas(root, width = 400, height = 300) c0.pack() image_data = PhotoImage(file = c1.gif ) c0.create_i

cards.gif from Tkinter import * root = Tk() c0 = Canvas(root, width = 400, height = 300) c0.pack() image_data = PhotoImage(file = c1.gif ) c0.create_i (Python ) Python Python 2 1. 2 2. 52 3. A, K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3, 2 4. 13 5. 6. 7. 8. 9. 13 10. 11. 12. Python http://www.jftz.com/cards/ 1 cards.gif from Tkinter import * root = Tk() c0 = Canvas(root,

More information

fx-260A_Users Guide_J

fx-260A_Users Guide_J fx-260a http://edu.casio.jp J 1 5 2 Fl SD F0 COMP F4 DEG F5 RAD F6 GRA 3 F7 FIX F8 SCI F9 NORM COMP DEG, RAD, GRA COMP SD F0 SD SC FIX F9 SD DEG, RAD, GRA t SD COMP DEG RAD GRA COMP 23 4.5 53 23 + 4.5,

More information

Fortran90/95 [9]! (1 ) " " 5 "Hello!"! 3. (line) Fortran Fortran 1 2 * (1 ) 132 ( ) * 2 ( Fortran ) Fortran ,6 (continuation line) 1

Fortran90/95 [9]! (1 )   5 Hello!! 3. (line) Fortran Fortran 1 2 * (1 ) 132 ( ) * 2 ( Fortran ) Fortran ,6 (continuation line) 1 Fortran90/95 2.1 Fortran 2-1 Hello! 1 program example2_01! end program 2! first test program ( ) 3 implicit none! 4 5 write(*,*) "Hello!"! write Hello! 6 7 stop! 8 end program example2_01 1 program 1!

More information

10/8 Finder,, 1 1. Finder MAC OS X 2. ( ) MAC OS X Java ( ) 3. MAC OS X Java ( ) / 10

10/8 Finder,, 1 1. Finder MAC OS X 2. ( ) MAC OS X Java ( ) 3. MAC OS X Java ( ) / 10 10/8 2015-10-08 URL : http://webct.kyushu-u.ac.jp, 10/8 1 / 10 10/8 Finder,, 1 1. Finder MAC OS X 2. ( ) MAC OS X Java ( ) 3. MAC OS X Java ( ) 1. 30 2 / 10 10/8 Finder 1 Figure : : Apple.com 2, 3 / 10

More information

プログラミング 1 ( 第 5 回 ) ループ処理 (for 文 ) range() 関数とリストによるシーケンス集合表現 1. Chapter 3.2 For Loops 1. もう一つのループ処理 2. シーケンス集合とコード例 2. Chapter 3.4 A Few Words About

プログラミング 1 ( 第 5 回 ) ループ処理 (for 文 ) range() 関数とリストによるシーケンス集合表現 1. Chapter 3.2 For Loops 1. もう一つのループ処理 2. シーケンス集合とコード例 2. Chapter 3.4 A Few Words About プログラミング 1 ( 第 5 回 ) ループ処理 (for 文 ) range() 関数とリストによるシーケンス集合表現 1. Chapter 3.2 For Loops 1. もう一つのループ処理 2. シーケンス集合とコード例 2. Chapter 3.4 A Few Words About Using Floats 1. 浮動小数点数の取り扱い 3. 演習 1. 演習 1 4: 初めてのレポート

More information

Python C/C++ IPMU IRAF

Python C/C++ IPMU IRAF Python C/C++ IPMU 2010 11 24IRAF Python Swig Numpy array Image Python 2.6.6 swig 1.3.40 numpy 1.5.0 pyfits 2.3 pyds9 1.1 svn co hjp://svn.scipy.org/svn/numpy/tags/1.5.0/doc/swig swig/numpy.i /usr/local/share/swig/1.3.40/python

More information

:56 1 (Forward kinematics) (Global frame) G r = (X, Y, Z) (Local frame) L r = (x, y, z) 1 X Y, Z X Y, Z 1 ( ) ( ) 1.2 (Joint rotati

:56 1 (Forward kinematics) (Global frame) G r = (X, Y, Z) (Local frame) L r = (x, y, z) 1 X Y, Z X Y, Z 1 ( ) ( ) 1.2 (Joint rotati 2013.09.21 17:56 1 (Forward kinematics) 1.1 2 (Global frame) G r (X, Y, Z) (Local frame) L r (x, y, z) 1 X Y, Z X Y, Z 1 ( ) ( ) 1.2 (Joint rotation) 3 P G r, L r G r L r Z α : G r Q L Z,α r (1) 1 G r

More information

離散数理工学 第 2回 数え上げの基礎:漸化式の立て方

離散数理工学 第 2回  数え上げの基礎:漸化式の立て方 2 okamotoy@uec.ac.jp 2015 10 20 2015 10 18 15:29 ( ) (2) 2015 10 20 1 / 45 ( ) 1 (10/6) ( ) (10/13) 2 (10/20) 3 ( ) (10/27) (11/3) 4 ( ) (11/10) 5 (11/17) 6 (11/24) 7 (12/1) 8 (12/8) ( ) (2) 2015 10 20

More information

from tkinter import * root = Tk() # variable teban = IntVar() teban.set(1) # def start(): canvas.create_rectangle(0, 0, 560, 560, fill= white ) for k

from tkinter import * root = Tk() # variable teban = IntVar() teban.set(1) # def start(): canvas.create_rectangle(0, 0, 560, 560, fill= white ) for k Zen Deep Zen Go from tkinter import * root = Tk() canvas = Canvas(root, width = 360, height=360) canvas.pack() root.mainloop() 1 from tkinter import * root = Tk() # variable teban = IntVar() teban.set(1)

More information

(Nov/2009) 2 / = (,,, ) 1 4 3 3 2/8

(Nov/2009) 2 / = (,,, ) 1 4 3 3 2/8 (Nov/2009) 1 sun open-office calc 2 1 2 3 3 1 3 1 2 3 1 2 3 1/8 (Nov/2009) 2 / = (,,, ) 1 4 3 3 2/8 (Nov/2009) 1 (true) false 1 2 2 A1:A10 A 1 2 150 3 200 4 250 5 320 6 330 7 360 8 380 9 420 10 480 (1)

More information

PYTHON 資料 電脳梁山泊烏賊塾 PYTHON 入門 ゲームプログラミング スプライトの衝突判定 スプライトの衝突判定 スプライトの衝突判定の例として インベーダーゲームのコードを 下記に示す PYTHON3 #coding: utf-8 import pygame from pygame.lo

PYTHON 資料 電脳梁山泊烏賊塾 PYTHON 入門 ゲームプログラミング スプライトの衝突判定 スプライトの衝突判定 スプライトの衝突判定の例として インベーダーゲームのコードを 下記に示す PYTHON3 #coding: utf-8 import pygame from pygame.lo PYTHON 入門 ゲームプログラミング スプライトの衝突判定 スプライトの衝突判定 スプライトの衝突判定の例として インベーダーゲームのコードを 下記に示す #coding: utf-8 import pygame from pygame.locals import * import os import sys SCR_RECT = Rect(0, 0, 640, 480) def main():

More information

haskell.gby

haskell.gby Haskell 1 2 3 Haskell ( ) 4 Haskell Lisper 5 Haskell = Haskell 6 Haskell Haskell... 7 qsort [8,2,5,1] [1,2,5,8] "Hello, " ++ "world!" "Hello, world!" 1 + 2 div 8 2 (+) 1 2 8 div 2 3 4 map even [1,2,3,4]

More information

26.fx95MS_Etype_J-cover_SA0311D

26.fx95MS_Etype_J-cover_SA0311D P fx-95ms fx-100ms fx-570ms fx-912ms (fx-115ms) fx-991ms English Manual Readers! Please be sure to read the important notice on the inside of the front cover of this manual. J http://www.casio.co.jp/edu/

More information

Microsoft PowerPoint - 11RubyIntro-No02.ppt [互換モード]

Microsoft PowerPoint - 11RubyIntro-No02.ppt [互換モード] Ruby 入門 東京電機大学櫻井彰人 Ruby とは? Ruby: 松本ゆきひろ氏による (1993) 純粋オブジェクト指向 スクリプト言語 Web プログラムで どんどんポピュラーに Ruby on Rails (http://www.rubyonrails.org/) なぜか きわめて Lisp like 松本行弘 (Matz) Introduction 実行環境 Windows/Unix/Linux/

More information

卒 業 研 究 報 告.PDF

卒 業 研 究 報 告.PDF C 13 2 9 1 1-1. 1-2. 2 2-1. 2-2. 2-3. 2-4. 3 3-1. 3-2. 3-3. 3-4. 3-5. 3-5-1. 3-5-2. 3-6. 3-6-1. 3-6-2. 4 5 6 7-1 - 1 1 1-1. 1-2. ++ Lisp Pascal Java Purl HTML Windows - 2-2 2 2-1. 1972 D.M. (Dennis M Ritchie)

More information

Parametric Polymorphism

Parametric Polymorphism ML 2 2011/04/19 Parametric Polymorphism Type Polymorphism ? : val hd_int : int list - > int val hd_bool : bool list - > bool val hd_i_x_b : (int * bool) list - > int * bool etc. let hd_int = function (x

More information

(1) プログラムの開始場所はいつでも main( ) メソッドから始まる 順番に実行され add( a,b) が実行される これは メソッドを呼び出す ともいう (2)add( ) メソッドに実行が移る この際 add( ) メソッド呼び出し時の a と b の値がそれぞれ add( ) メソッド

(1) プログラムの開始場所はいつでも main( ) メソッドから始まる 順番に実行され add( a,b) が実行される これは メソッドを呼び出す ともいう (2)add( ) メソッドに実行が移る この際 add( ) メソッド呼び出し時の a と b の値がそれぞれ add( ) メソッド メソッド ( 教科書第 7 章 p.221~p.239) ここまでには文字列を表示する System.out.print() やキーボードから整数を入力する stdin.nextint() などを用いてプログラムを作成してきた これらはメソッドと呼ばれるプログラムを構成する部品である メソッドとは Java や C++ などのオブジェクト指向プログラミング言語で利用されている概念であり 他の言語での関数やサブルーチンに相当するが

More information

Ver.1 1/17/2003 2

Ver.1 1/17/2003 2 Ver.1 1/17/2003 1 Ver.1 1/17/2003 2 Ver.1 1/17/2003 3 Ver.1 1/17/2003 4 Ver.1 1/17/2003 5 Ver.1 1/17/2003 6 Ver.1 1/17/2003 MALTAB M GUI figure >> guide GUI GUI OK 7 Ver.1 1/17/2003 8 Ver.1 1/17/2003 Callback

More information

Java updated

Java updated Java 2003.07.14 updated 3 1 Java 5 1.1 Java................................. 5 1.2 Java..................................... 5 1.3 Java................................ 6 1.3.1 Java.......................

More information

III 1 (X, d) d U d X (X, d). 1. (X, d).. (i) d(x, y) d(z, y) d(x, z) (ii) d(x, y) d(z, w) d(x, z) + d(y, w) 2. (X, d). F X.. (1), X F, (2) F 1, F 2 F

III 1 (X, d) d U d X (X, d). 1. (X, d).. (i) d(x, y) d(z, y) d(x, z) (ii) d(x, y) d(z, w) d(x, z) + d(y, w) 2. (X, d). F X.. (1), X F, (2) F 1, F 2 F III 1 (X, d) d U d X (X, d). 1. (X, d).. (i) d(x, y) d(z, y) d(x, z) (ii) d(x, y) d(z, w) d(x, z) + d(y, w) 2. (X, d). F X.. (1), X F, (2) F 1, F 2 F F 1 F 2 F, (3) F λ F λ F λ F. 3., A λ λ A λ. B λ λ

More information

Agenda Motivation How it works Performance Limitation Conclusion

Agenda Motivation How it works Performance Limitation Conclusion py2llvm: Python to LLVM translator Syoyo Fujita Agenda Motivation How it works Performance Limitation Conclusion Agenda Motivation How it works Performance Limitation Conclusion py2llvm Python LLVM Python,

More information

4 4 θ X θ P θ 4. 0, 405 P 0 X 405 X P 4. () 60 () 45 () 40 (4) 765 (5) 40 B 60 0 P = 90, = ( ) = X

4 4 θ X θ P θ 4. 0, 405 P 0 X 405 X P 4. () 60 () 45 () 40 (4) 765 (5) 40 B 60 0 P = 90, = ( ) = X 4 4. 4.. 5 5 0 A P P P X X X X +45 45 0 45 60 70 X 60 X 0 P P 4 4 θ X θ P θ 4. 0, 405 P 0 X 405 X P 4. () 60 () 45 () 40 (4) 765 (5) 40 B 60 0 P 0 0 + 60 = 90, 0 + 60 = 750 0 + 60 ( ) = 0 90 750 0 90 0

More information

BASICとVisual Basic

BASICとVisual Basic Visual Basic BASIC Visual Basic BASICBeginner's All purpose Symbolic Instruction Code Visual Basic Windows BASIC BASIC Visual Basic Visual Basic End Sub .Visual Basic Visual Basic VB 1-1.Visual Basic

More information

07_dist_01.pdf.pdf

07_dist_01.pdf.pdf cos θ sin θ R(θ) = ( sin θ cos θ ) (xi+1, yi+1) θ (xi, yi) z R x (θ) = 1 0 0 0 cos θ sin θ 0 sin θ cos θ y R y (θ) = cos θ 0 sin θ 0 1 0 sin θ 0 cos θ x R z (θ) = cos θ sin θ 0 sin θ cos θ 0 0 0 1 指数増殖モデルのおさらい

More information

Java 3 p.2 3 Java : boolean Graphics draw3drect fill3drect C int C OK while (1) int boolean switch case C Calendar java.util.calendar A

Java 3 p.2 3 Java : boolean Graphics draw3drect fill3drect C int C OK while (1) int boolean switch case C Calendar java.util.calendar A Java 3 p.1 3 Java Java if for while C 3.1 if Java if C if if ( ) 1 if ( ) 1 else 2 1 1 2 2 1, 2 { Q 3.1.1 1. int n = 2; if (n

More information

36.fx82MS_Dtype_J-c_SA0311C.p65

36.fx82MS_Dtype_J-c_SA0311C.p65 P fx-82ms fx-83ms fx-85ms fx-270ms fx-300ms fx-350ms J http://www.casio.co.jp/edu/ AB2Mode =... COMP... Deg... Norm 1... a b /c... Dot 1 2...1...2 1 2 u u u 3 5 fx-82ms... 23 fx-83ms85ms270ms300ms 350MS...

More information

基礎数学I

基礎数学I I & II ii ii........... 22................. 25 12............... 28.................. 28.................... 31............. 32.................. 34 3 1 9.................... 1....................... 1............

More information

離散数理工学 第 2回 数え上げの基礎:漸化式の立て方

離散数理工学 第 2回  数え上げの基礎:漸化式の立て方 2 okamotoy@uec.ac.jp 2014 10 21 2014 10 29 10:48 ( ) (2) 2014 10 21 1 / 44 ( ) 1 (10/7) ( ) (10/14) 2 (10/21) 3 ( ) (10/28) 4 ( ) (11/4) 5 (11/11) 6 (11/18) 7 (11/25) ( ) (2) 2014 10 21 2 / 44 ( ) 8 (12/2)

More information

1 return main() { main main C 1 戻り値の型 関数名 引数 関数ブロックをあらわす中括弧 main() 関数の定義 int main(void){ printf("hello World!!\n"); return 0; 戻り値 1: main() 2.2 C main

1 return main() { main main C 1 戻り値の型 関数名 引数 関数ブロックをあらわす中括弧 main() 関数の定義 int main(void){ printf(hello World!!\n); return 0; 戻り値 1: main() 2.2 C main C 2007 5 29 C 1 11 2 2.1 main() 1 FORTRAN C main() main main() main() 1 return 1 1 return main() { main main C 1 戻り値の型 関数名 引数 関数ブロックをあらわす中括弧 main() 関数の定義 int main(void){ printf("hello World!!\n"); return

More information

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裱£²²ó ¡Ý½ÉÂꣲ¤Î²òÀ⡤±é½¬£²¡Ý

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裱£²²ó  ¡Ý½ÉÂꣲ¤Î²òÀ⡤±é½¬£²¡Ý (2018) 2018 7 5 f(x) [ 1, 1] 3 3 1 3 f(x) dx c i f(x i ) 1 0 i=1 = 5 ) ( ) 3 ( 9 f + 8 5 9 f(0) + 5 3 9 f 5 1 1 + sin(x) θ ( 1 θ dx = tan 1 + sin x 2 π ) + 1 4 1 3 [a, b] f a, b double G3(double (*f)(),

More information

IA hara@math.kyushu-u.ac.jp Last updated: January,......................................................................................................................................................................................

More information

fx-370ES_912ES_UsersGuide_J02

fx-370ES_912ES_UsersGuide_J02 Eng Eng 3 A Eng 1 1,234 Eng a 1234= W W 2 123 Eng a 123= 1W( ) S-D S-D π 72 A S-D π π nπ n d π c a b π c π ' f ' A S-D 1 A '5c6= f f f 73 2 π A 15(π)*'2c5= f 3 ' A!2e*!3= f 74 (CMPLX) 15 CMPLX N2 A u u

More information

from Tkinter import * root = Tk() c0 = Canvas(root, width = 400, height = 300) c0.pack() image_data = PhotoImage(file = c1.gif ) c0.create_image(200,

from Tkinter import * root = Tk() c0 = Canvas(root, width = 400, height = 300) c0.pack() image_data = PhotoImage(file = c1.gif ) c0.create_image(200, (Python ) Python Python 2 1. 2 2. 52 3. A, K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3, 2 4. 13 5. 6. 7. 8. 9. 13 10. 11. 12. Python.gif 1 from Tkinter import * root = Tk() c0 = Canvas(root, width = 400, height =

More information

: Shift-Return evaluate 2.3 Sage? Shift-Return abs 2 abs? 2: abs 3: fac

: Shift-Return evaluate 2.3 Sage? Shift-Return abs 2 abs? 2: abs 3: fac Bulletin of JSSAC(2012) Vol. 18, No. 2, pp. 161-171 : Sage 1 Sage Mathematica Sage (William Stein) 2005 2 2006 2 UCSD Sage Days 1 Sage 1.0 4.7.2 1) Sage Maxima, R 2 Sage Firefox Internet Explorer Sage

More information

1 1 sin cos P (primary) S (secondly) 2 P S A sin(ω2πt + α) A ω 1 ω α V T m T m 1 100Hz m 2 36km 500Hz. 36km 1

1 1 sin cos P (primary) S (secondly) 2 P S A sin(ω2πt + α) A ω 1 ω α V T m T m 1 100Hz m 2 36km 500Hz. 36km 1 sin cos P (primary) S (secondly) 2 P S A sin(ω2πt + α) A ω ω α 3 3 2 2V 3 33+.6T m T 5 34m Hz. 34 3.4m 2 36km 5Hz. 36km m 34 m 5 34 + m 5 33 5 =.66m 34m 34 x =.66 55Hz, 35 5 =.7 485.7Hz 2 V 5Hz.5V.5V V

More information

‘îŁñ›È−wfiÁŁÊ”À„±I --Tensorflow‡ð”g‡Á‡½fl»ŁÊ›ð’Í--

‘îŁñ›È−wfiÁŁÊ”À„±I  --Tensorflow‡ð”g‡Á‡½fl»ŁÊ›ð’Í-- I Tensorflow 2018 10 31 ( ) ( ) Tensorflow 2018 10 31 ( ) 1 / 39 Tensorflow I Tensorflow Python Python(+Python Anaconda) Tensorflow Tensorflow 1 Anaconda Prompt 2 Anaconda Prompt (base) C:\Users\komori>conda

More information

sin x

sin x Mathematica 1998 7, 2001 3 Mathematica Mathematica 1 Mathematica 2 2 Mathematica 3 3 4 4 7 5 8 6 10 7 13 8 17 9 18 10 20 11 21 12 23 1 13 23 13.1............................ 24 13.2..........................

More information

Microsoft PowerPoint - dm1_7.pptx

Microsoft PowerPoint - dm1_7.pptx スケジュール 09/26 イントロダクション1 : デジタル画像とは, 量 化と標本化,Dynamic Range 10/03 イントロダクション2 : デジタルカメラ, 間の視覚, 表 系 10/10 フィルタ処理 1 : トーンカーブ, 線形フィルタ デジタルメディア処理 1 担当 : 井尻敬 10/17 フィルタ処理 2 : 線形フィルタ, ハーフトーニング 10/24 フィルタ処理 3 :

More information

Java演習(4) -- 変数と型 --

Java演習(4)   -- 変数と型 -- 50 20 20 5 (20, 20) O 50 100 150 200 250 300 350 x (reserved 50 100 y 50 20 20 5 (20, 20) (1)(Blocks1.java) import javax.swing.japplet; import java.awt.graphics; (reserved public class Blocks1 extends

More information

double float

double float 2015 3 13 1 2 2 3 2.1.......................... 3 2.2............................. 3 3 4 3.1............................... 4 3.2 double float......................... 5 3.3 main.......................

More information

13 Student Software TI-Nspire CX CAS TI Web TI-Nspire CX CAS Student Software ( ) 1 Student Software 37 Student Software Nspire Nspire Nspir

13 Student Software TI-Nspire CX CAS TI Web TI-Nspire CX CAS Student Software ( ) 1 Student Software 37 Student Software Nspire Nspire Nspir 13 Student Software TI-Nspire CX CAS TI Web TI-Nspire CX CAS Student Software ( ) 1 Student Software 37 Student Software 37.1 37.1 Nspire Nspire Nspire 37.1: Student Software 13 2 13 Student Software esc

More information

, x R, f (x),, df dx : R R,, f : R R, f(x) ( ).,, f (a) d f dx (a), f (a) d3 f dx 3 (a),, f (n) (a) dn f dx n (a), f d f dx, f d3 f dx 3,, f (n) dn f

, x R, f (x),, df dx : R R,, f : R R, f(x) ( ).,, f (a) d f dx (a), f (a) d3 f dx 3 (a),, f (n) (a) dn f dx n (a), f d f dx, f d3 f dx 3,, f (n) dn f ,,,,.,,,. R f : R R R a R, f(a + ) f(a) lim 0 (), df dx (a) f (a), f(x) x a, f (a), f(x) x a ( ). y f(a + ) y f(x) f(a+) f(a) f(a + ) f(a) f(a) x a 0 a a + x 0 a a + x y y f(x) 0 : 0, f(a+) f(a)., f(x)

More information

¥×¥í¥°¥é¥ß¥ó¥°±é½¬I Exercise on Programming I [1zh] ` `%%%`#`&12_`__~~~ alse

¥×¥í¥°¥é¥ß¥ó¥°±é½¬I  Exercise on Programming I [1zh] ` `%%%`#`&12_`__~~~alse I Exercise on Programming I http://bit.ly/oitprog1 1, 2 of 14 ( RD S ) I 1, 2 of 14 1 / 44 Ruby Ruby ( RD S ) I 1, 2 of 14 2 / 44 7 5 9 2 9 3 3 2 6 5 1 3 2 5 6 4 7 8 4 5 2 7 9 6 4 7 1 3 ( RD S ) I 1, 2

More information

(37564) Python@HACHINONE Simple 3 1 VPython 2014 2 VPython 22017 91 Python 3.5 2 x x ans01 ans**3x ans**3x ans +1 3 # -*- coding: utf-8 -*- # 完全立方に対する立方根を求める x = int(raw_input(' 整数を入力してください :')) ans =

More information

stat-excel-12.tex (2009 12 8 ) 2 -countif Excel 22 http://software.ssri.co.jp/statweb2/ 1. 111 3 2. 4 4 3 3. E4:E10 E4:E10 OK 4. E4:E10 E4:E10 5 6 2/1

stat-excel-12.tex (2009 12 8 ) 2 -countif Excel 22 http://software.ssri.co.jp/statweb2/ 1. 111 3 2. 4 4 3 3. E4:E10 E4:E10 OK 4. E4:E10 E4:E10 5 6 2/1 stat-excel-12.tex (2009 12 8 ) 1 (Microsoft) (excel) (Sun Microsystems) = (open-office calc) 1 2 3 3 1 3 1 2 3 1 2 3 1/12 stat-excel-12.tex (2009 12 8 ) 2 -countif Excel 22 http://software.ssri.co.jp/statweb2/

More information

表1-表4_No78_念校.indd

表1-表4_No78_念校.indd mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm Fs = tan + tan. sin(1.5) tan sin. cos Fs ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

More information

ランダムウォークの境界条件・偏微分方程式の数値計算

ランダムウォークの境界条件・偏微分方程式の数値計算 B L06(2018-05-22 Tue) : Time-stamp: 2018-05-22 Tue 21:53 JST hig,, 2, multiply transf http://hig3.net L06 B(2018) 1 / 38 L05-Q1 Quiz : 1 M λ 1 = 1 u 1 ( ). M u 1 = u 1, u 1 = ( 3 4 ) s (s 0)., u 1 = 1

More information

知能科学:ニューラルネットワーク

知能科学:ニューラルネットワーク 2 3 4 (Neural Network) (Deep Learning) (Deep Learning) ( x x = ax + b x x x ? x x x w σ b = σ(wx + b) x w b w b .2.8.6 σ(x) = + e x.4.2 -.2 - -5 5 x w x2 w2 σ x3 w3 b = σ(w x + w 2 x 2 + w 3 x 3 + b) x,

More information

知能科学:ニューラルネットワーク

知能科学:ニューラルネットワーク 2 3 4 (Neural Network) (Deep Learning) (Deep Learning) ( x x = ax + b x x x ? x x x w σ b = σ(wx + b) x w b w b .2.8.6 σ(x) = + e x.4.2 -.2 - -5 5 x w x2 w2 σ x3 w3 b = σ(w x + w 2 x 2 + w 3 x 3 + b) x,

More information

di-problem.dvi

di-problem.dvi 005/05/05 by. I : : : : : : : : : : : : : : : : : : : : : : : : :. II : : : : : : : : : : : : : : : : : : : : : : : : : 3 3. III : : : : : : : : : : : : : : : : : : : : : : : : 4 4. : : : : : : : : : :

More information

USB 0.6 https://duet.doshisha.ac.jp/info/index.jsp 2 ID TA DUET 24:00 DUET XXX -YY.c ( ) XXX -YY.txt() XXX ID 3 YY ID 5 () #define StudentID 231

USB 0.6 https://duet.doshisha.ac.jp/info/index.jsp 2 ID TA DUET 24:00 DUET XXX -YY.c ( ) XXX -YY.txt() XXX ID 3 YY ID 5 () #define StudentID 231 0 0.1 ANSI-C 0.2 web http://www1.doshisha.ac.jp/ kibuki/programming/resume p.html 0.3 2012 1 9/28 0 [ 01] 2 10/5 1 C 2 3 10/12 10 1 2 [ 02] 4 10/19 3 5 10/26 3 [ 03] 6 11/2 3 [ 04] 7 11/9 8 11/16 4 9 11/30

More information

2009 IA 5 I 22, 23, 24, 25, 26, (1) Arcsin 1 ( 2 (4) Arccos 1 ) 2 3 (2) Arcsin( 1) (3) Arccos 2 (5) Arctan 1 (6) Arctan ( 3 ) 3 2. n (1) ta

2009 IA 5 I 22, 23, 24, 25, 26, (1) Arcsin 1 ( 2 (4) Arccos 1 ) 2 3 (2) Arcsin( 1) (3) Arccos 2 (5) Arctan 1 (6) Arctan ( 3 ) 3 2. n (1) ta 009 IA 5 I, 3, 4, 5, 6, 7 6 3. () Arcsin ( (4) Arccos ) 3 () Arcsin( ) (3) Arccos (5) Arctan (6) Arctan ( 3 ) 3. n () tan x (nπ π/, nπ + π/) f n (x) f n (x) fn (x) Arctan x () sin x [nπ π/, nπ +π/] g n

More information

No2 4 y =sinx (5) y = p sin(2x +3) (6) y = 1 tan(3x 2) (7) y =cos 2 (4x +5) (8) y = cos x 1+sinx 5 (1) y =sinx cos x 6 f(x) = sin(sin x) f 0 (π) (2) y

No2 4 y =sinx (5) y = p sin(2x +3) (6) y = 1 tan(3x 2) (7) y =cos 2 (4x +5) (8) y = cos x 1+sinx 5 (1) y =sinx cos x 6 f(x) = sin(sin x) f 0 (π) (2) y No1 1 (1) 2 f(x) =1+x + x 2 + + x n, g(x) = 1 (n +1)xn + nx n+1 (1 x) 2 x 6= 1 f 0 (x) =g(x) y = f(x)g(x) y 0 = f 0 (x)g(x)+f(x)g 0 (x) 3 (1) y = x2 x +1 x (2) y = 1 g(x) y0 = g0 (x) {g(x)} 2 (2) y = µ

More information

Microsoft PowerPoint - dm1_3.pptx

Microsoft PowerPoint - dm1_3.pptx 画像処理演習 : python デジタルメディア処理 1 担当 : 井尻敬 達成 標 Python+OpenCV 環境における簡単なプログラムを作成できる 本講義にて解説したフィルタ処理をプログラムとして記述できる 注 : 本講義で取り扱うのはあくまでほんの触りの部分だけです. もし興味が湧いた は, デジタルメディア処理 2や3 年後期の 度情報処理演習 Aを履修するか, 独学で学修を進めてください.

More information

Word 2000 Standard

Word 2000 Standard .1.1 [ ]-[ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [OK] [ ] 1 .1.2 [ ]-[ ] [ ] [ ] [ [ ] [ ][ ] [ ] [ ] [ / ] [OK] [ ] [ ] [ ] [ ] 2 [OK] [ ] [ ] .2.1 [ ]-[ ] [F5] [ ] [ ] [] [ ] [ ] [ ] [ ] 4 ..1 [ ]-[ ] 5 ..2

More information

コメント プログラム中には コメントを加える事ができます 処理の際には無視されるので 注釈や覚え書きとして利 できます print("hello Sapporo!") # Hello Sapporo! と 表 する # コメントは無視される 字列 字列とは 単語や 章のような 字の連なったものです

コメント プログラム中には コメントを加える事ができます 処理の際には無視されるので 注釈や覚え書きとして利 できます print(hello Sapporo!) # Hello Sapporo! と 表 する # コメントは無視される 字列 字列とは 単語や 章のような 字の連なったものです CHaser のための Python 基礎編 これは U-16 札幌プロコン事前講習会に向けて メンター向けに Python の基礎を すドキュメントです 意するもの 基本編 PC Windows パソコンで CHaser を動かすまで で 意した USB メモリ Python プログラムの実 法は 主に 2 通りあります 対話型シェルによる実 対話型シェルとは その名の通り 対話をしているように

More information

2 1 Octave Octave Window M m.m Octave Window 1.2 octave:1> a = 1 a = 1 octave:2> b = 1.23 b = octave:3> c = 3; ; % octave:4> x = pi x =

2 1 Octave Octave Window M m.m Octave Window 1.2 octave:1> a = 1 a = 1 octave:2> b = 1.23 b = octave:3> c = 3; ; % octave:4> x = pi x = 1 1 Octave GNU Octave Matlab John W. Eaton 1992 2.0.16 2.1.35 Octave Matlab gnuplot Matlab Octave MATLAB [1] Octave [1] 2.7 Octave Matlab Octave Octave 2.1.35 2.5 2.0.16 Octave 1.1 Octave octave Octave

More information

情報科学概論 第1回資料

情報科学概論 第1回資料 1. Excel (C) Hiroshi Pen Fujimori 1 2. (Excel) 2.1 Excel : 2.2Excel Excel (C) Hiroshi Pen Fujimori 2 256 (IV) :C (C 65536 B4 :2 (2 A3 Excel (C) Hiroshi Pen Fujimori 3 Tips: (1) B3 (2) (*1) (3) (4)Word

More information

9 2 1 f(x, y) = xy sin x cos y x y cos y y x sin x d (x, y) = y cos y (x sin x) = y cos y(sin x + x cos x) x dx d (x, y) = x sin x (y cos y) = x sin x

9 2 1 f(x, y) = xy sin x cos y x y cos y y x sin x d (x, y) = y cos y (x sin x) = y cos y(sin x + x cos x) x dx d (x, y) = x sin x (y cos y) = x sin x 2009 9 6 16 7 1 7.1 1 1 1 9 2 1 f(x, y) = xy sin x cos y x y cos y y x sin x d (x, y) = y cos y (x sin x) = y cos y(sin x + x cos x) x dx d (x, y) = x sin x (y cos y) = x sin x(cos y y sin y) y dy 1 sin

More information