Visual Python, Numpy, Matplotlib

Size: px
Start display at page:

Download "Visual Python, Numpy, Matplotlib"

Transcription

1 Visual Python, Numpy, Matplotlib 1 / 57

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

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

4 3 Visual Python: 3D Numpy, Scipy: Matplotlib: ( ) 4 / 57

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

6 1 ( ) 2 vector 3D 3 Visual Python 6 / 57

7 1 1 n_steps = 2 dt = ( - ) / n_steps # 3 x = 4 v = 5 t = 6 for i in range(n_steps): 7 alpha = / # 8 x += v * dt # += * 9 v += alpha * dt # += * 10 t += dt., t, x, v, 7 / 57

8 : y = 0 t = 0 10 y = 0, v = 0 : ky + mg (g = 0.98) : t, 1 k = g = m = n_steps = dt = (10.0-0) / n_steps 6 y = v = for i in range(n_steps): 9 alpha = -k * y / m + g 10 y += v * dt 11 v += alpha * dt 8 / 57

9 3D Visual Python vector :, 1 from vpython import * 2 k = g = vector(0.0, -9.8, 0.0) 4 m = n_steps = dt = (10.0-0) / n_steps 7 y = vector(0.0, 0.0, 0.0) 8 v = vector(0.0, 0.0, 0.0) 9 for i in range(n_steps): 10 alpha = -k * y /m + g 11 y += v * dt 12 v += alpha * dt 9 / 57

10 Visual Python pos : (helix) 1 from vpython import * 2 k = g = vector(0.0, -9.8, 0.0) 4 m = n_steps = dt = (10.0-0) / n_steps 7 s = sphere(pos=vector(0.0, 0.0, 0.0)) 8 s.vel = vector(0.0, 0.0, 0.0) 9 scene.autoscale = 0 # 10 scene.autocenter = 0 # 11 for i in range(n_steps): 12 rate(1.0/dt) 13 s.alpha = -k * s.pos /m + g 14 s.pos += s.vel * dt 15 s.vel += s.alpha * dt 10 / 57

11 rate(f) : (pos ) f : 1 f ( 1 ) 1: ( ) 2: 1 scene.autocenter = 0 2 scene.autoscale = 0 11 / 57

12 :, 1, 1 = Visual Python 12 / 57

13 Contents 1 2 Visual Python 3 Numpy Scipy 4 Scipy 5 Matplotlib 13 / 57

14 Numpy Scipy SciPy NumPy (Numerical Python) NumPy SciPy numpy, scipy scipy, numpy,, numpy, scipy scipy 14 / 57

15 speed learning, 15 / 57

16 array : numpy numpy, array array : 1 import numpy as np 2 np.array( ) : 1 import numpy as np 2 x = np.array([2,0,1,4]) 3 print(x) 4 print(len(x)) 5 print(x[1]) : 1 [ ] / 57

17 array : 1 import numpy as np 2 A = np.array([[1,2,3],[4,5,6]]) 3 print(a) 4 print(len(a)) 5 print(a[1][1]) : 1 [[1 2 3] 2 [4 5 6]] , 3, 4,... array 17 / 57

18 array 1 import numpy as np 2 x = np.array([2,0,1,4]) 3 y = np.array([5,6,7,8]) 4 print(x + y) 5 print(x * y) # 6 print(x.dot(y)) 1 [ ] 2 [ ] # * 3 49 # 18 / 57

19 array ( ) : 1 import numpy 2 A = numpy.array([[1,2,3],[4,5,6]]) 3 x = numpy.array([2,4,6]) 4 print(a.dot(x)) 1 [28 64] 1 import numpy 2 A = numpy.array([[1,2,3],[4,5,6]]) 3 B = numpy.array([[2,3],[4,5],[6,7]]) 4 print(a.dot(b)) 1 [[28 34] 2 [64 79]] 19 / 57

20 matrix : * array,, (, * ) matrix 1 import numpy as np 2 A = np.matrix([[1,2,3],[4,5,6]]) 3 B = np.matrix([[2,3],[4,5],[6,7]]) 4 print(a * B) 1 [[28 34] 2 [64 79]], array, matrix 20 / 57

21 array (1) ( ) 1 >>> np.arange(2,3,0.2) 2 array([ 2., 2.2, 2.4, 2.6, 2.8]) ( ) 1 >>> np.linspace(2,3,6) 2 array([ 2., 2.2, 2.4, 2.6, 2.8, 3. ]) >>> np.zeros((3,2)) 2 array([[ 0., 0.], 3 [ 0., 0.], 4 [ 0., 0.]]) 1 np.ones((2,3)) 2 array([[ 1., 1., 1.], 3 [ 1., 1., 1.]]) 21 / 57

22 array (2), zeros, 1 import numpy as np 2 3 def make_diag(n): 4 A = np.zeros((n,n)) 5 for i in range(n): 6 A[i,i] = i return A 8 9 print(make_diag(4)) 1 [[ ] 2 [ ] 3 [ ] 4 [ ]] 22 / 57

23 array (3) reshape, ( ) (1 ) (2 ) A = np.arange(0, 15, 1).reshape(3, 5) 2 print(a) 3 B = A.reshape(5, 3) 4 print(b) 1 [[ ] 2 [ ] 3 [ ]] 4 [[ 0 1 2] 5 [ 3 4 5] 6 [ 6 7 8] 7 [ ] 8 [ ]] 23 / 57

24 array (4) 1 >>> np.random.random((3,3)) 2 array([[ , , ], 3 [ , , ], 4 [ , , ]]) 1 >>> def f(i,j): 2... return I + J >>> np.fromfunction(f, (3,3)) 5 array([[ 0., 1., 2.], 6 [ 1., 2., 3.], 7 [ 2., 3., 4.]]) 24 / 57

25 ,,,, 1 import numpy 2 A = np.arange(0, 15, 1).reshape(3, 5) 3 >>> A 4 array([[ 0, 1, 2, 3, 4], 5 [ 5, 6, 7, 8, 9], 6 [10, 11, 12, 13, 14]]) 7 >>> A[1,2] >>> A[1:3,2:4] 10 array([[ 7, 8], 11 [12, 13]]) 25 / 57

26 ,, 1 >>> A[1:3,:] # = A[1:3,0:5] 2 array([[ 5, 6, 7, 8, 9], 3 [10, 11, 12, 13, 14]]) 4 >>> A[:,2:4] # = A[0:3,2:4] 5 array([[ 2, 3], 6 [ 7, 8], 7 [12, 13]]) 8 >>> A[:,2] 9 array([ 2, 7, 12]) 10 >>> A[:,:] 11 array([[ 0, 1, 2, 3, 4], 12 [ 5, 6, 7, 8, 9], 13 [10, 11, 12, 13, 14]]) 26 / 57

27 Universal (1) array 1 >>> import numpy as np 2 >>> r = np.linspace(0, 0.5 * math.pi, 6) 3 >>> r 4 array([ 0., , , , , ]) 5 >>> r array([ 2., , , , , ]) 7 >>> r ** 2 8 array([ 0., , , , , ]) 27 / 57

28 Universal (2) sin, cos math array array numpy 1 >>> import numpy as np 2 >>> import math 3 >>> r = np.linspace(0, 0.5 * math.pi, 6) 4 >>> math.sin(r) 5 Traceback (most recent call last): 6 File "<stdin>", line 1, in <module> 7 TypeError: only length-1 arrays can be converted to Python scalars 8 >>> np.sin(0.5 * math.pi) >>> np.sin(r) 11 array([ 0., , , , , 1. ]) 28 / 57

29 Numpy (Ax = b) 1 x = np.linalg.solve(a, b) 1 d,p = np.linalg.eig(a) 1 rank = np.linalg.det(a) 1 rank = np.linalg.matrix_rank(a) / 57

30 Contents 1 2 Visual Python 3 Numpy Scipy 4 Scipy 5 Matplotlib 30 / 57

31 Scipy (scipy.integrate) (scipy.odeint) (scipy.optimize)... scipy 31 / 57

32 Contents 1 2 Visual Python 3 Numpy Scipy 4 Scipy 5 Matplotlib 32 / 57

33 Matplotlib Visual,, ( ) Matplotlib, numpy array, + 33 / 57

34 Matplotlib,.. document : user s guide: Pyplot tutorial ( y = f(x) ) mplot3d (3D ) Gallery ( ) Plotting Command Summary ( ) 34 / 57

35 1 (y = f(x)) : matplotlib.pyplot, plot show, 1 import matplotlib.pyplot as plt 2 plt.plot(...) 3 plt.show(...) : x, y array, plot, show 1 import matplotlib.pyplot as plt 2 import numpy as np 3 x = np.arange(0, 10, 0.1) # [ ] 4 y = np.sin(x) # universal 5 # y = [sin(0) sin(0.1) sin(0.2)... ] 6 plt.plot(x, y) 7 plt.show() 35 / 57

36 1 (y = f(x)) 1 import matplotlib.pyplot as plt 2 import numpy as np 3 x = np.arange(0, 10, 0.1) # [ ] 4 y = np.sin(x) # universal 5 # y = [sin(0) sin(0.1) sin(0.2)... ] 6 plt.plot(x, y) 7 plt.show() 36 / 57

37 (,,... etc.) plot bar, scatter pyplot tutorial, gallery? help 1 >>> import matplotlib.pyplot as plt 2 >>> help(plt.plot) 37 / 57

38 2 (z = f(x, y)) : 1 plot 2 1 pcolor ( ) 2 contour ( ) 3 etc. (gallery plotting command summary ) 2 (x i, y i, z i), x i, y i, z i 2 (x, y) [0, 2] [0, 3] x 2 y 2 1 import matplotlib.pyplot as plt 2 import numpy as np 3 X = np.array([[0,0,0,0],[1,1,1,1],[2,2,2,2]]) 4 Y = np.array([[0,1,2,3],[0,1,2,3],[0,1,2,3]]) 5 Z = X ** 2 - Y ** 2 # universal 6 # Z = array([[0,-1,-4,-9],[1,0,-3,-8],[4,3,0,-5]]) 7 plt.pcolor(x, Y, Z) 8 plt.show() X, Y ( ) 38 / 57

39 2 (z = f(x, y)) np.meshgrid 1 import matplotlib.pyplot as plt 2 import numpy as np 3 X = np.array([0,1,2]) 4 Y = np.array([0,1,2,3]) 5 X,Y = np.meshgrid(x, Y) 6 Z = X ** 2 - Y ** 2 7 plt.pcolor(x, Y, Z) 8 plt.show() 39 / 57

40 2 (y = f(x, y)) 1 import matplotlib.pyplot as plt 2 import numpy as np 3 X = np.arange(0, 10, 0.1) 4 Y = np.arange(0, 10, 0.1) 5 X,Y = np.meshgrid(x, Y) 6 Z = X ** 2 - Y ** 2 7 plt.pcolor(x, Y, Z) 8 plt.show() 40 / 57

41 3D 1 import matplotlib.pyplot as plt 2 fig = plt.figure() # windows 3 ax = fig.add_subplot(,, ) # 4 ax.plot(...) 5 fig.show(...) (3x2 ) 1 import matplotlib.pyplot as plt 2 fig = plt.figure() 3 ax0 = fig.add_subplot(3,2,1) # fig.add_subplot(321) 4 ax1 = fig.add_subplot(3,2,2) # fig.add_subplot(322) ax0.plot(...) 7 ax1.plot(...) fig.show(...) 41 / 57

42 2 (z = f(x, y)) 3D : plot plot surface plot wireframe etc. 1 import matplotlib.pyplot as plt 2 import numpy as np 3 import mpl toolkits.mplot3d.axes3d 4 fig = plt.figure() 5 ax = fig.add_subplot(1,1,1, projection= 3d ) 6 X = np.arange(0, 10, 0.1) 7 Y = np.arange(0, 10, 0.1) 8 X,Y = np.meshgrid(x, Y) 9 Z = X ** 2 - Y ** 2 10 ax.plot_surface(x, Y, Z) 11 plt.show() 42 / 57

43 3D 1 import matplotlib.pyplot as plt 2 import numpy as np 3 import mpl_toolkits.mplot3d.axes3d 4 fig = plt.figure() 5 ax = fig.add_subplot(1,1,1, projection= 3d ) 6 X = np.arange(0, 10, 0.1) 7 Y = np.arange(0, 10, 0.1) 8 X,Y = np.meshgrid(x, Y) 9 Z = X ** 2 - Y ** 2 10 ax.plot_surface(x, Y, Z) 11 plt.show() 43 / 57

44 Matplotlib,,,, Jupyter, 44 / 57

45 : y = sin kx (0 x 2π), k = 1, 2, 3, 5 : k (= 3) 1 import matplotlib.pyplot as plt 2 import numpy as np 3 4 x = np.linspace(0.0, 2.0 * np.pi, 100) 5 plt.plot(x, np.sin(3 * x)) 6 plt.show() 45 / 57

46 1 import matplotlib.pyplot as plt 2 import numpy as np 3 4 x = np.linspace(0.0, 2.0 * np.pi, 100) 5 for k in range(1, 6): 6 plt.plot(x, np.sin(k * x)) 7 plt.show() : 5 ( ) 46 / 57

47 3, ( ), Jupyter, 1 Jupyter ( ) python 47 / 57

48 1 plt.plot(...), ( ) ( ), animation.artistsanimation, %matplotlib notebook 1 %matplotlib notebook 2 import matplotlib.pyplot as plt 3 import matplotlib.animation as animation 4 import numpy as np 5 6 x = np.linspace(0.0, 2.0 * np.pi, 100) 7 plots = [] 8 for k in range(1, 6): 9 plots.append(plt.plot(x, np.sin(k * x))) 10 a = animation.artistanimation(plt.gcf(), plots, repeat=0) 11 plt.show() 48 / 57

49 1. max frames 1 n_steps = max_frames = 50 3 interval = math.ceil(n_steps / max_frames) 4 plots = [] 5 for t in range(n_steps): 6 if t % interval == 0: 7 plots.append(...), : 2, 3, Jupyter 49 / 57

50 ( ) 2 plt.plot(...) ( ) ( ) set data ( ) pause ( ) ( ) Jupyter (python. ) 1 x = np.linspace(0.0, 2.0 * np.pi, 100) 2 for k in range(1, 6): 3 if k == 1: 4 [ line ] = plt.plot(x, np.sin(k * x)) # ( ) 5 else: 6 line.set data(x, np.sin(k * x)) # ( ) 7 plt.pause(0.1) # ( ) : plt.plot(...), ( 1 ) ; 50 / 57

51 ( ) 3 (Jupyter, ) 2., yield ( ) 1 def generate_plots(): 2 x = np.linspace(0.0, 2.0 * np.pi, 100) 3 for k in range(1, 6): 4 if k == 1: 5 [line] = plt.plot(x, np.sin(k * x)) 6 else: 7 line.set_data(x, np.sin(k * x)) 8 yield [line] # ( ), 1 animate iterator(generate plots(), interval=100) animate iterator 51 / 57

52 animate iterator ( ) 1 import matplotlib.pyplot as plt 2 import matplotlib.animation as animation 3 4 def animate_iterator(iterator, **kwargs): 5 def fun(*args): 6 try: 7 return next(iterator) 8 except StopIteration: 9 return [] 10 ani = animation.funcanimation(plt.gcf(), fun, 11 **kwargs) 12 plt.show() 52 / 57

53 2 次元 (pcolor) の場合 復習: アニメーションなしで静止画 (z = y sin 3x) を書くだけの例 %matplotlib notebook import matplotlib.pyplot as plt import numpy as np x = np.linspace(0.0, 1.0, 100) y = np.linspace(0.0, 1.0, 100) x,y = np.meshgrid(x, y) plt.pcolor(x, y, np.sin(y - np.sin(3 * x))) plt.show() 53 / 57

54 2 (pcolor) 1 1 (pcolor, animation.artistanimation ) 1 %matplotlib notebook 2 import matplotlib.pyplot as plt 3 import matplotlib.animation as animation 4 import numpy as np 5 x = np.linspace(0.0, 1.0, 100) 6 y = np.linspace(0.0, 1.0, 100) 7 x,y = np.meshgrid(x, y) 8 pcolors = [] 9 for k in range(1, 20): 10 pcolors.append([ plt.pcolor(x,y,y-np.sin(k*x)) ]) 11 a = animation.artistanimation(plt.gcf(), pcolors, 12 repeat=0) 13 plt.show() plt.plot, ( )plt.pcolor, 1 ( ) 54 / 57

55 ( ) 2 (pcolor) 2 : Jupyter 1 (plot) set data, 2 (pcolor) set array, z 1, 1 ( ) 1 import matplotlib.pyplot as plt 2 import numpy as np 3 x = np.linspace(0.0, 1.0, 100) 4 y = np.linspace(0.0, 1.0, 100) 5 x,y = np.meshgrid(x, y) 6 for k in range(1, 20): 7 if k == 1: 8 f = plt.pcolor(x, y, y - np.sin(k * x)) 9 else: 10 f.set array(shrink1(y - np.sin(k * x))) 11 plt.pause(0.1) shrink1 55 / 57

56 shrink1 1 def shrink1(z): 2 m,n = z.shape 3 return z[:m-1,:n-1].flatten() 56 / 57

57 ( ) 2 (pcolor) 3 (Jupyter, ) 1 def generate_pcolors(): 2 x = np.linspace(0.0, 1.0, 100) 3 y = np.linspace(0.0, 1.0, 100) 4 x,y = np.meshgrid(x, y) 5 for k in range(1, 20): 6 if k == 1: 7 f = plt.pcolor(x, y, y - np.sin(k * x)) 8 else: 9 f.set_array(shrink1(y - np.sin(k * x))) 10 yield [ f ], 1 animate_iterator(generate_pcolors(), interval=100) animate iterator 1 57 / 57

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

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

Python Speed Learning

Python   Speed Learning Python Speed Learning 1 / 89 1 2 3 4 (import) 5 6 7 (for) (if) 8 9 10 ( ) 11 12 for 13 2 / 89 Contents 1 2 3 4 (import) 5 6 7 (for) (if) 8 9 10 ( ) 11 12 for 13 3 / 89 (def) (for) (if) etc. 1 4 / 89 Jupyter

More information

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

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

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

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

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

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

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

‘îŁñ›È−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

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

Python入門:アプリケーションを作る

Python入門:アプリケーションを作る Python 入門 1 アプリケーションを作る 2 アプリケーションを作る前に 何をしたいのか 前提 手順 得られる結果 どういう手順なのか 手順を細かい手順に分解 ライブラリでは何ができるか どういうエラーがあり得るか 3 ファイル中の各単語の出現回数 を数える ファイルを開く :open() アルファベット以外の文字で分割 正規表現を利用 辞書構造を使って 単語と出現回数を登録 import re

More information

スライド 1

スライド 1 (11-2) 2019.6.26 電気通信大学大学院情報理工学研究科末廣尚士 - 手先の軌道生成 ( 再掲 ) その都度, 逆運動学計算をするとは少し手間がかかる. 本当に必要か? 分割が小さければ, ニュートン ラフソン法で 収束 させる必要はないかもしれない. 2 - 直線軌道で分割する ( 再掲 ) 3 - 関節角の微少量をもとめる ( 再掲 ) 4 - 分解運動 ( 速度 ) 制御 ( 再掲

More information

( ) kadai4, kadai4.zip.,. 3 cos x [ π, π] Python. ( 100 ), x cos x ( ). (, ). def print cos(): print cos()

( ) kadai4, kadai4.zip.,. 3 cos x [ π, π] Python. ( 100 ), x cos x ( ). (, ). def print cos(): print cos() 4 2010.6 1 :, HP.. HP 4 (, PGM/PPM )., python,,, 2, kadai4,.,,, ( )., ( ) N, exn.py ( 3 ex3.py ). N 3.., ( )., ( ) N, (exn.txt).. 1 ( ) kadai4, kadai4.zip.,. 3 cos x [ π, π] Python. ( 100 ), x cos x (

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

Python による科学技術計算の概要

Python による科学技術計算の概要 1 2 https://www.kdnuggets.com/2017/05/poll-analyticsdata-science-machine-learning-software-leaders.html https://www.kdnuggets.com/2017/08/pythonovertakes-r-leader-analytics-data-science.html 3 4 5 6 7

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

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

Python (2) 1 (random number) MVP[1] MCNP[2] Python 1. π Python Python (random number generator) ( ) (pseudorandom number) Lehmer (l

Python (2) 1 (random number) MVP[1] MCNP[2] Python 1. π Python Python (random number generator) ( ) (pseudorandom number) Lehmer (l Python (2) 1 (random number) MVP[1] MCNP[2] Python 1. π 2. 3. 1 4. 2 Python Python 2 2.1 (random number generator) ( ) (pseudorandom number) Lehmer (linear congruential generator)[3] 0 1 S i = (as i 1

More information

() x + y + y + x dy dx = 0 () dy + xy = x dx y + x y ( 5) ( s55906) 0.7. (). 5 (). ( 6) ( s6590) 0.8 m n. 0.9 n n A. ( 6) ( s6590) f A (λ) = det(a λi)

() x + y + y + x dy dx = 0 () dy + xy = x dx y + x y ( 5) ( s55906) 0.7. (). 5 (). ( 6) ( s6590) 0.8 m n. 0.9 n n A. ( 6) ( s6590) f A (λ) = det(a λi) 0. A A = 4 IC () det A () A () x + y + z = x y z X Y Z = A x y z ( 5) ( s5590) 0. a + b + c b c () a a + b + c c a b a + b + c 0 a b c () a 0 c b b c 0 a c b a 0 0. A A = 7 5 4 5 0 ( 5) ( s5590) () A ()

More information

GIZMO ¤ÇÍ·¤ó¤Ç¤ß¤ë

GIZMO ¤ÇÍ·¤ó¤Ç¤ß¤ë GIZMO February 21, 2019 GIZMO February 21, 2019 1 / 17 GIZMO Users Guide URL http://www.tapir.caltech.edu/ phopkins/site/gizmo_files/gizmo_documentation.html /home/hydro00/gizmo_hydro2018.tar.gz GIZMO_hydro2018/practice

More information

I I / 68

I I / 68 2013.07.04 I 2013 3 I 2013.07.04 1 / 68 I 2013.07.04 2 / 68 I 2013.07.04 3 / 68 heat1.f90 heat2.f90 /tmp/130704/heat2.f90 I 2013.07.04 4 / 68 diff heat1.f90 heat2.f90!! heat2. f 9 0! c m > NGRID! c nmax

More information

Python , Python 3 Python Python 1.1 Python 1 3 Mac OS Python Mac MacPorts sudo port install py35-numpy +openblas

Python , Python 3 Python Python 1.1 Python 1 3 Mac OS Python Mac MacPorts sudo port install py35-numpy +openblas Python 3 2016 2 23, 2018 1 7 1 1.1 Python 3 Python Python 1.1 Python 1 3 Mac OS Python 2.7 1 2 1.2 Mac MacPorts sudo port install py35-numpy +openblas sudo port install py35-scipy +openblas sudo port install

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

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

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè2²ó

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè2²ó 2 2015 4 20 1 (4/13) : ruby 2 / 49 2 ( ) : gnuplot 3 / 49 1 1 2014 6 IIJ / 4 / 49 1 ( ) / 5 / 49 ( ) 6 / 49 (summary statistics) : (mean) (median) (mode) : (range) (variance) (standard deviation) 7 / 49

More information

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè2²ó

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè2²ó 2 212 4 13 1 (4/6) : ruby 2 / 35 ( ) : gnuplot 3 / 35 ( ) 4 / 35 (summary statistics) : (mean) (median) (mode) : (range) (variance) (standard deviation) 5 / 35 (mean): x = 1 n (median): { xr+1 m, m = 2r

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

#A A A F, F d F P + F P = d P F, F y P F F x A.1 ( α, 0), (α, 0) α > 0) (x, y) (x + α) 2 + y 2, (x α) 2 + y 2 d (x + α)2 + y 2 + (x α) 2 + y 2 =

#A A A F, F d F P + F P = d P F, F y P F F x A.1 ( α, 0), (α, 0) α > 0) (x, y) (x + α) 2 + y 2, (x α) 2 + y 2 d (x + α)2 + y 2 + (x α) 2 + y 2 = #A A A. F, F d F P + F P = d P F, F P F F A. α, 0, α, 0 α > 0, + α +, α + d + α + + α + = d d F, F 0 < α < d + α + = d α + + α + = d d α + + α + d α + = d 4 4d α + = d 4 8d + 6 http://mth.cs.kitmi-it.c.jp/

More information

Microsoft Word - GPM_read_program_guide_forPython_V5.1.docx

Microsoft Word - GPM_read_program_guide_forPython_V5.1.docx 2018/03/15 第 版 本書は全球降 観測衛星 (GPM) のデータを読み込むプログラム (Python) の作成 法についてまとめたものです 本書で解説するサンプルプログラムは GPM はプロダクトバージョン 5 GSMaP はプロダクトバージョン 4 で動作を確認しています 目次 1. はじめに... 3 2.GPM データの 法... 4 3. 関連 書 サンプルプログラムの 法...

More information

Python を用いた人工衛星 (MODIS) データの解析手引書 担当 : 植山雅仁 1. 新規プロジェクトの立ち上げと準備 Jupyter Notebook を立ち上げる Hello World! という文字が表示されるプログラムを実行する >> print('hello World!') [C

Python を用いた人工衛星 (MODIS) データの解析手引書 担当 : 植山雅仁 1. 新規プロジェクトの立ち上げと準備 Jupyter Notebook を立ち上げる Hello World! という文字が表示されるプログラムを実行する >> print('hello World!') [C Python を用いた人工衛星 (MODIS) データの解析手引書 担当 : 植山雅仁 1. 新規プロジェクトの立ち上げと準備 Jupyter Notebook を立ち上げる Hello World! という文字が表示されるプログラムを実行する print('hello World!') [Cell] => [Run Cells] から セル毎にプログラムを実行することができる ([CTL]+[Tab]+[Enter]

More information

1 n A a 11 a 1n A =.. a m1 a mn Ax = λx (1) x n λ (eigenvalue problem) x = 0 ( x 0 ) λ A ( ) λ Ax = λx x Ax = λx y T A = λy T x Ax = λx cx ( 1) 1.1 Th

1 n A a 11 a 1n A =.. a m1 a mn Ax = λx (1) x n λ (eigenvalue problem) x = 0 ( x 0 ) λ A ( ) λ Ax = λx x Ax = λx y T A = λy T x Ax = λx cx ( 1) 1.1 Th 1 n A a 11 a 1n A = a m1 a mn Ax = λx (1) x n λ (eigenvalue problem) x = ( x ) λ A ( ) λ Ax = λx x Ax = λx y T A = λy T x Ax = λx cx ( 1) 11 Th9-1 Ax = λx λe n A = λ a 11 a 12 a 1n a 21 λ a 22 a n1 a n2

More information

05 I I / 56

05 I I / 56 05 I 2015 2015.05.14 I 05 2015.05.14 1 / 56 I 05 2015.05.14 2 / 56 cd mkdir vis01 OK cd vis01 cp /tmp/150514/leibniz.*. I 05 2015.05.14 3 / 56 I 05 2015.05.14 4 / 56 Information visualization Data visualization,

More information

CuPy とは何か?

CuPy とは何か? GTC Japan 2018 CuPy NumPy 互換 GPU ライブラリによる Python での高速計算 Preferred Networks 取締役最高技術責任者奥田遼介 okuta@preferred.jp CuPy とは何か? CuPy とは GPU を使って NumPy 互換の機能を提供するライブラリ import numpy as np X_cpu = np.zeros((10,))

More information

Ipython Notebook の紹介

Ipython Notebook の紹介 IPython Notebook の 紹 介 と cerlでの 利 用 計 画 2015/09/15 T. Obina KEKB 制 御 打 ち 合 わせ 導 入 を 検 討 した 動 機 :High Level Application リアルタイム 表 示 や 基 本 的 な 操 作 パネルは CSS でOK 高 レベルアプリケーションをどうするか??? 現 在 のcERL/PF/PF-ARでは

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

1 No.1 5 C 1 I III F 1 F 2 F 1 F 2 2 Φ 2 (t) = Φ 1 (t) Φ 1 (t t). = Φ 1(t) t = ( 1.5e 0.5t 2.4e 4t 2e 10t ) τ < 0 t > τ Φ 2 (t) < 0 lim t Φ 2 (t) = 0

1 No.1 5 C 1 I III F 1 F 2 F 1 F 2 2 Φ 2 (t) = Φ 1 (t) Φ 1 (t t). = Φ 1(t) t = ( 1.5e 0.5t 2.4e 4t 2e 10t ) τ < 0 t > τ Φ 2 (t) < 0 lim t Φ 2 (t) = 0 1 No.1 5 C 1 I III F 1 F 2 F 1 F 2 2 Φ 2 (t) = Φ 1 (t) Φ 1 (t t). = Φ 1(t) t = ( 1.5e 0.5t 2.4e 4t 2e 10t ) τ < 0 t > τ Φ 2 (t) < 0 lim t Φ 2 (t) = 0 0 < t < τ I II 0 No.2 2 C x y x y > 0 x 0 x > b a dx

More information

1 3 1.1.......................... 3 1............................... 3 1.3....................... 5 1.4.......................... 6 1.5........................ 7 8.1......................... 8..............................

More information

最近の粒子、流体の可視化事情

最近の粒子、流体の可視化事情 最近の粒子 流体の可視化事情 滝脇知也 ( 国立天文台 ) 可視化の例 国立天文台 4 次元デジタル宇宙プロジェクト提供 なぜ可視化するのか? A) 専門家むけ (1D,2D) 背後の物理を理解するため B) 非専門家むけ (3D) セットアップやダイナミクスを簡単に紹介するため C) 一般人むけ (3D) 研究の魅力を分かってもらうため予算獲得のため 用途によりツールや必要となる知識 技法も異なってくる

More information

RL_tutorial

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

More information

スライド 1

スライド 1 (8) 2017.6.7 電気通信大学大学院情報理工学研究科末廣尚士 9. ロボットアームの逆運動学 ( 幾何 学的 ( 解析的 ) 解法 ) 何をしたいか 手首, 手先, ツールの 3 次元空間での位置や姿勢から, それを実現する関節角度を計算する. アームソリューション, アームの解とも呼ぶ 何のために たとえばビジョンで認識された物をつかむ場合, 物の位置 姿勢は 3 次元空間で表現されることが普通である.

More information

5. [1 ] 1 [], u(x, t) t c u(x, t) x (5.3) ξ x + ct, η x ct (5.4),u(x, t) ξ, η u(ξ, η), ξ t,, ( u(ξ,η) ξ η u(x, t) t ) u(x, t) { ( u(ξ, η) c t ξ ξ { (

5. [1 ] 1 [], u(x, t) t c u(x, t) x (5.3) ξ x + ct, η x ct (5.4),u(x, t) ξ, η u(ξ, η), ξ t,, ( u(ξ,η) ξ η u(x, t) t ) u(x, t) { ( u(ξ, η) c t ξ ξ { ( 5 5.1 [ ] ) d f(t) + a d f(t) + bf(t) : f(t) 1 dt dt ) u(x, t) c u(x, t) : u(x, t) t x : ( ) ) 1 : y + ay, : y + ay + by : ( ) 1 ) : y + ay, : yy + ay 3 ( ): ( ) ) : y + ay, : y + ay b [],,, [ ] au xx

More information

001-002_...j.f......_..

001-002_...j.f......_.. 1 2 1 Chapter of Export 1 10 2 12 3 14 4 16 5 18 6 20 7 22 8 24 9 26 10 28 11 30 12 32 13 34 14 36 15 38 16 40 17 42 18 44 19 46 3 20 48 21 50 22 52 23 54 24 56 25 58 26 60 27 62 28 64 29 66 30 68 Chapter

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

2 A I / 58

2 A I / 58 2 A 2018.07.12 I 2 2018.07.12 1 / 58 I 2 2018.07.12 2 / 58 π-computer gnuplot 5/31 1 π-computer -X ssh π-computer gnuplot I 2 2018.07.12 3 / 58 gnuplot> gnuplot> plot sin(x) I 2 2018.07.12 4 / 58 cp -r

More information

1.2.1 readline Python GNU readline Mac GPL GNU readline NetBSD editline Stand-alone readline module 1 readline py2.6-macosx-10.6-universal.egg

1.2.1 readline Python GNU readline Mac GPL GNU readline NetBSD editline Stand-alone readline module 1 readline py2.6-macosx-10.6-universal.egg Python 2012 12 24, 2017 12 10 1 1.1 Python 2010 Ruby ( ) Runge-Kutta MATLAB LAPACK Ruby Python MATLAB INTLAB Python 3 Python MATLAB Python 1.2 Mac (1) Mac OS X SciPy http://www.python. org/download/ python-2.7.3-macosx10.6.dmg

More information

version 1.0 November 2010 PyRAF Y. Nakajima Computer and Data Management Division Subaru Telescope NAOJ

version 1.0 November 2010 PyRAF Y. Nakajima Computer and Data Management Division Subaru Telescope NAOJ version 1.0 November 2010 PyRAF Y. Nakajima Computer and Data Management Division Subaru Telescope NAOJ Chapter 1 PyRAF 1.1 PyRAF PyRAF IRAF Python STScI 1998 (1) IRAF-CL (2) CL-? (3) IRAF Python wrapper

More information

(1) (2) (3) (4) HB B ( ) (5) (6) (7) 40 (8) (9) (10)

(1) (2) (3) (4) HB B ( ) (5) (6) (7) 40 (8) (9) (10) 2017 12 9 4 1 30 4 10 3 1 30 3 30 2 1 30 2 50 1 1 30 2 10 (1) (2) (3) (4) HB B ( ) (5) (6) (7) 40 (8) (9) (10) (1) i 23 c 23 0 1 2 3 4 5 6 7 8 9 a b d e f g h i (2) 23 23 (3) 23 ( 23 ) 23 x 1 x 2 23 x

More information

計画の立て方1巻とびら.indd

計画の立て方1巻とびら.indd CONTENTS Lesson 1 Lesson 2 Lesson 3 Lesson 4 Lesson 5 Lesson 6 Lesson 7 Lesson 8 Summary 8 10 12 14 16 18 20 22 24 Lesson 1 Lesson 2 Lesson 3 Lesson 4 Lesson 5 Lesson 6 Summary 26 28 30 32 34 36 38 4 Lesson

More information

2 I I / 61

2 I I / 61 2 I 2017.07.13 I 2 2017.07.13 1 / 61 I 2 2017.07.13 2 / 61 I 2 2017.07.13 3 / 61 7/13 2 7/20 I 7/27 II I 2 2017.07.13 4 / 61 π-computer gnuplot MobaXterm Wiki PC X11 DISPLAY I 2 2017.07.13 5 / 61 Mac 1.

More information

pressnet_g36ill.indd

pressnet_g36ill.indd CONTENTS 04 06 08 10 12 14 15 16 18 20 21 22 23 24 25 26 28 30 DATA DATA DATA DATA DATA DATA DATA DATA DATA DATA 32 33 34 36 38 40 41 42 DATA DATA DATA DATA DATA DATA 43 02 CONTENTS 04 06 08 10 12 03 TOPICS

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

1. A0 A B A0 A : A1,...,A5 B : B1,...,B

1. A0 A B A0 A : A1,...,A5 B : B1,...,B 1. A0 A B A0 A : A1,...,A5 B : B1,...,B12 2. 3. 4. 5. A0 A B f : A B 4 (i) f (ii) f (iii) C 2 g, h: C A f g = f h g = h (iv) C 2 g, h: B C g f = h f g = h 4 (1) (i) (iii) (2) (iii) (i) (3) (ii) (iv) (4)

More information

sarupaw.dvi

sarupaw.dvi PAW Which Even Monkeys Can Use H.Kitamura & His Company 9 8 19 preface PAW Which Even Monkies Can Use bold itaric vector ntuple v nt ( ) quit e-mail kitamura@phys01.phys.kobe-u.ac.jp homepage http://phys01.phys.kobe-u.ac.jp:2080/~kohama/sarupaw.html

More information

joho09.ppt

joho09.ppt s M B e E s: (+ or -) M: B: (=2) e: E: ax 2 + bx + c = 0 y = ax 2 + bx + c x a, b y +/- [a, b] a, b y (a+b) / 2 1-2 1-3 x 1 A a, b y 1. 2. a, b 3. for Loop (b-a)/ 4. y=a*x*x + b*x + c 5. y==0.0 y (y2)

More information

Appendix A BASIC BASIC Beginner s All-purpose Symbolic Instruction Code FORTRAN COBOL C JAVA PASCAL (NEC N88-BASIC Windows BASIC (1) (2) ( ) BASIC BAS

Appendix A BASIC BASIC Beginner s All-purpose Symbolic Instruction Code FORTRAN COBOL C JAVA PASCAL (NEC N88-BASIC Windows BASIC (1) (2) ( ) BASIC BAS Appendix A BASIC BASIC Beginner s All-purpose Symbolic Instruction Code FORTRAN COBOL C JAVA PASCAL (NEC N88-BASIC Windows BASIC (1 (2 ( BASIC BASIC download TUTORIAL.PDF http://hp.vector.co.jp/authors/va008683/

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

untitled

untitled 20 7 1 22 7 1 1 2 3 7 8 9 10 11 13 14 15 17 18 19 21 22 - 1 - - 2 - - 3 - - 4 - 50 200 50 200-5 - 50 200 50 200 50 200 - 6 - - 7 - () - 8 - (XY) - 9 - 112-10 - - 11 - - 12 - - 13 - - 14 - - 15 - - 16 -

More information

untitled

untitled 19 1 19 19 3 8 1 19 1 61 2 479 1965 64 1237 148 1272 58 183 X 1 X 2 12 2 15 A B 5 18 B 29 X 1 12 10 31 A 1 58 Y B 14 1 25 3 31 1 5 5 15 Y B 1 232 Y B 1 4235 14 11 8 5350 2409 X 1 15 10 10 B Y Y 2 X 1 X

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

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

[ 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

( )

( ) 18 10 01 ( ) 1 2018 4 1.1 2018............................... 4 1.2 2018......................... 5 2 2017 7 2.1 2017............................... 7 2.2 2017......................... 8 3 2016 9 3.1 2016...............................

More information

untitled

untitled 20010916 22;1017;23;20020108;15;20; 1 N = {1, 2, } Z + = {0, 1, 2, } Z = {0, ±1, ±2, } Q = { p p Z, q N} R = { lim a q n n a n Q, n N; sup a n < } R + = {x R x 0} n = {a + b 1 a, b R} u, v 1 R 2 2 R 3

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

P-12 P-13 3 4 28 16 00 17 30 P-14 P-15 P-16 4 14 29 17 00 18 30 P-17 P-18 P-19 P-20 P-21 P-22

P-12 P-13 3 4 28 16 00 17 30 P-14 P-15 P-16 4 14 29 17 00 18 30 P-17 P-18 P-19 P-20 P-21 P-22 1 14 28 16 00 17 30 P-1 P-2 P-3 P-4 P-5 2 24 29 17 00 18 30 P-6 P-7 P-8 P-9 P-10 P-11 P-12 P-13 3 4 28 16 00 17 30 P-14 P-15 P-16 4 14 29 17 00 18 30 P-17 P-18 P-19 P-20 P-21 P-22 5 24 28 16 00 17 30 P-23

More information

FX ) 2

FX ) 2 (FX) 1 1 2009 12 12 13 2009 1 FX ) 2 1 (FX) 2 1 2 1 2 3 2010 8 FX 1998 1 FX FX 4 1 1 (FX) () () 1998 4 1 100 120 1 100 120 120 100 20 FX 100 100 100 1 100 100 100 1 100 1 100 100 1 100 101 101 100 100

More information

gnuplot gnuplot 1 3 y = x 3 + 3x 2 2 y = sin x sin(x) x*x*x+3*x*x

gnuplot gnuplot 1 3 y = x 3 + 3x 2 2 y = sin x sin(x) x*x*x+3*x*x gnuplot gnuplot y = x + x y = sin x.8 sin(x) 8 7 6 x*x*x+*x*x.6.. -. -. -.6 -.8 - - - - - - - -. - -. - -.. gnuplot gnuplot> set xrange[-.:.] gnuplot> plot x**+*x** y = x x gnuolot> reset gnuplot> plot

More information

f(x) = x (1) f (1) (2) f (2) f(x) x = a y y = f(x) f (a) y = f(x) A(a, f(a)) f(a + h) f(x) = A f(a) A x (3, 3) O a a + h x 1 f(x) x = a

f(x) = x (1) f (1) (2) f (2) f(x) x = a y y = f(x) f (a) y = f(x) A(a, f(a)) f(a + h) f(x) = A f(a) A x (3, 3) O a a + h x 1 f(x) x = a 3 3.1 3.1.1 A f(a + h) f(a) f(x) lim f(x) x = a h 0 h f(x) x = a f 0 (a) f 0 (a) = lim h!0 f(a + h) f(a) h = lim x!a f(x) f(a) x a a + h = x h = x a h 0 x a 3.1 f(x) = x x = 3 f 0 (3) f (3) = lim h 0 (

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

4 4 4 a b c d a b A c d A a da ad bce O E O n A n O ad bc a d n A n O 5 {a n } S n a k n a n + k S n a a n+ S n n S n n log x x {xy } x, y x + y 7 fx

4 4 4 a b c d a b A c d A a da ad bce O E O n A n O ad bc a d n A n O 5 {a n } S n a k n a n + k S n a a n+ S n n S n n log x x {xy } x, y x + y 7 fx 4 4 5 4 I II III A B C, 5 7 I II A B,, 8, 9 I II A B O A,, Bb, b, Cc, c, c b c b b c c c OA BC P BC OP BC P AP BC n f n x xn e x! e n! n f n x f n x f n x f k x k 4 e > f n x dx k k! fx sin x cos x tan

More information

Python @HACHINONE 15 1 V Python 2014 2 : x F k F = kx : F m g F = mg 変位 (m) 質量 (kg) 0.0865 0.1 0.1015 0.15 0.1106 0.2 0.1279 0.25 0.1892 0.3 0.2695 0.35 0.2888 0.4 0.2425 0.45 0.3465 0.5 0.3225 0.55 0.3764

More information

2

2 from One 1 2 24 2 3 4 30 4 5 47 13 6 7 34 2 13 8 34.................................. 9 15-1-5 15-1-4 10 11 12 12 13 14 15 A ( 1) A A 2 B B 16 2 2 17 3 C C 18 3 19 ( ) 15 2 5 ( 56 2 16 20 2 5 ) (1) (2)

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

Jupiter User Guide 1.0.2 30 3 16 Jupiter Genius[2] Genius Jupiter Jupiter Stacked Alternating Offers Protocol(SAOP)[1] Jupiter 1 Genius Jupiter 1 Jupiter 2 Jupiter 3 1 1 2 4 1 Jupiter 5 1.1..............................

More information

211 kotaro@math.titech.ac.jp 1 R *1 n n R n *2 R n = {(x 1,..., x n ) x 1,..., x n R}. R R 2 R 3 R n R n R n D D R n *3 ) (x 1,..., x n ) f(x 1,..., x n ) f D *4 n 2 n = 1 ( ) 1 f D R n f : D R 1.1. (x,

More information

LSM5Pascal Ver 3.2 GFP 4D Image VisArt Carl Zeiss Co.,Ltd.

LSM5Pascal Ver 3.2 GFP 4D Image VisArt Carl Zeiss Co.,Ltd. LSM5Pascal Ver 3.2 GFP 4D Image VisArt 2004.03 LSM5PASCAL V3.2 LSM5PASCAL SW3.2Axiovert200M 1 1 2 3 3 4 4 5 SingleTrack 9 Multi Track 10,18 5 / 21 6 3 27 7 35 8 ( OFF) 40 LSM5PASCAL V3.2 LSM5PASCAL 65

More information

() n C + n C + n C + + n C n n (3) n C + n C + n C 4 + n C + n C 3 + n C 5 + (5) (6 ) n C + nc + 3 nc n nc n (7 ) n C + nc + 3 nc n nc n (

() n C + n C + n C + + n C n n (3) n C + n C + n C 4 + n C + n C 3 + n C 5 + (5) (6 ) n C + nc + 3 nc n nc n (7 ) n C + nc + 3 nc n nc n ( 3 n nc k+ k + 3 () n C r n C n r nc r C r + C r ( r n ) () n C + n C + n C + + n C n n (3) n C + n C + n C 4 + n C + n C 3 + n C 5 + (4) n C n n C + n C + n C + + n C n (5) k k n C k n C k (6) n C + nc

More information

Gmech08.dvi

Gmech08.dvi 51 5 5.1 5.1.1 P r P z θ P P P z e r e, z ) r, θ, ) 5.1 z r e θ,, z r, θ, = r sin θ cos = r sin θ sin 5.1) e θ e z = r cos θ r, θ, 5.1: 0 r

More information

曲面のパラメタ表示と接線ベクトル

曲面のパラメタ表示と接線ベクトル L11(2011-07-06 Wed) :Time-stamp: 2011-07-06 Wed 13:08 JST hig 1,,. 2. http://hig3.net () (L11) 2011-07-06 Wed 1 / 18 ( ) 1 V = (xy2 ) x + (2y) y = y 2 + 2. 2 V = 4y., D V ds = 2 2 ( ) 4 x 2 4y dy dx =

More information

ECCS. ECCS,. ( 2. Mac Do-file Editor. Mac Do-file Editor Windows Do-file Editor Top Do-file e

ECCS. ECCS,. (  2. Mac Do-file Editor. Mac Do-file Editor Windows Do-file Editor Top Do-file e 1 1 2015 4 6 1. ECCS. ECCS,. (https://ras.ecc.u-tokyo.ac.jp/guacamole/) 2. Mac Do-file Editor. Mac Do-file Editor Windows Do-file Editor Top Do-file editor, Do View Do-file Editor Execute(do). 3. Mac System

More information