programmingII2019-v01

Size: px
Start display at page:

Download "programmingII2019-v01"

Transcription

1 II Q

2

3 A 6/11 6/18 6/25 7/2 7/9 7/16 7/23 B 6/12 6/19 6/24 7/3 7/10 7/17 7/24

4

5 x = 0 dv(t) dt = g Z t2 t 1 dv(t) dt dt = Z t2 t 1 gdt g v(t 2 ) = v(t 1 ) + g(t 2 t 1 ) v v(t) x g(t 2 t 1 ) t 1 t 2 t

6 v(t 2 ) = v(t 1 ) + g(t 2 t 1 ) = + x ( ) v V T g dv dt = g v(t) = mg 1 m v(t) e m t ϒ: t 1 t 2 t

7 (differential equation) h i v(t + t) = v(t) + g m v(t) v t (time step size) V T v(t) g t 1 t t t t 2 t

8 h i v(t + t) = v(t) + g m v(t) t mg v(t + t) = mg v(t) + apple 1 mg v(t) m t ṽ = v mg f t = m t t = t m ṽ( t + f t) = ṽ( t) + 1 ṽ( t) f t

9 (exact solution) v(t) = 1 t = 1 e t v 1 e t = 0.63 = 1 (time constant) t t = e t = 0.63 t = 1 t

10 Xcode (1)

11 Xcode (2) mac OS > Command Line Tool Xcode Ver.

12 Xcode (3) Language: C++ Product name: 01FallingParticle Location:

13 Xcode (4) Xcode Preferences Locations Derived Data Relative

14 (2)Run main.cpp Build&Run (1) Build Succeeded OK (3) Console Hello OK

15 main.cpp #include <iostream> int main(int argc, const char * argv[]) { // insert code here... std::cout << "Hello, World!\n"; return 0; } #include <iostream> int main(int argc, const char * argv[]) { double v0 = 0.0; double dt = 0.1; double v = v0; return 0; } v 0 = 0 t = 0.1 v(0) = v 0

16 #include <iostream> main.cpp: int main(int argc, const char * argv[]) { double v0 = 0.0; double dt = 0.1; double v = v0; std::cout << "v: " << v << std::endl; return 0; } Build, Run Console v: 0.0 OK C printf C++ std::cout std::cout << std::endl (end of line) std standard

17 #include <iostream> int main(int argc, const char * argv[]) { double v0 = 0.0; double dt = 0.1; double v = v0; std::cout << "v: " << v << std::endl; v = v + (1.0 - v)*dt; std::cout << "v: " << v << std::endl; return 0; } Build, Run v

18 #include <iostream> int main(int argc, const char * argv[]) { double v0 = 0.0; double dt = 0.1; double v = v0; int stepend = 100; int step = 0; std::cout << "v: " << v << std::endl; while(step < stepend){ v += (1.0 - v)*dt; v +=! v = v + step++; step = step + 1 std::cout << "v(" << dt*(double)step << ") = " << v << std::endl; } return 0; } t = t step Build, Run v

19 gnuplot #include <iostream> int main(int argc, const char * argv[]) { double v0 = 0.0; double dt = 0.1; double v = v0; int stepend = 100; int step = 0; std::cout << dt*(double)step << " " << v << std::endl; while(step < stepend){ v += (1.0 - v)*dt; step++; std::cout << dt*(double)step << " " << v << std::endl; } return 0; }

20 gnuplot Terminal Terminal cd (change directory) (1)cd (2) Debug drag & drop (3)Enter pwd ( /Debug/ )

21 gnuplot Terminal Terminal $./01FallingParticle Terminal $./01FallingParticle > data.txt

22 rm: Unix Terminal pwd (print working directory) cd: (change directory) ls:./../ cd../ cp: (cp data.txt data_copy.txt ) mv: (mv data.txt../)

23 gnuplot Terminal gnuplot $gnuplot gnuplot >set xlabel t >set ylabel v >plot data.txt title v

24 gnuplot >plot data.txt title v, 1-exp(-x)

25 gnuplot File > Save as PDF

26 Xcode #include <iostream> #include <cmath> (exp ) double Output(double t, double v, bool display){ double vexact = exp(-t); double error = (v - vexact)/vexact; if(vexact == 0.0) error = 0.0; if(display == true) std::cout << t << ": " << v << ", " << vexact << ", " << error << std::endl; return fabs(error); }; e(t) = v(t) v ex (t) vex (t) int main(int argc, const char * argv[]) { double v0 = 0.0; double dt = 0.1; double v = v0; int stepend = 10; int step = 0; Output(dt*(double)step, v, true); while(step < stepend){ v += (1.0 - v)*dt; step++; Output(dt*(double)step, v, true); } return 0; } t = 1 Output

27 gnuplot gnuplot pipe gnuplot gnuplot ( ) ( )

28 GnuplotInterface GnuplotInterface.h &.cpp pipe www2.kobe-u.ac.jp/~hayashi /01FallingParticle/01FallingParticle/ main.cpp drag & drop

29 in main.cpp header #include <iostream> #include <cmath> #include GnuplotInterface.h" #include (<> ) double Output(double t, double v, bool display){...} int main(int argc, const char * argv[]) { GnuplotInterface* gnuplot = new GnuplotInterface(); double v0 = 0.0; double dt = 0.1; double v = v0; int stepend = 10; int step = 0; Output(dt*(double)step, v, true); while(step < stepend){ v += (1.0 - v)*dt; step++; Output(dt*(double)step, v, true); } delete gnuplot; return 0; } (gnuplot )

30 #include <iostream> #include <cmath> #include "GnuplotInterface.h" double Output(double t, double v, bool display){...}; int main(int argc, const char * argv[]) { GnuplotInterface* gnuplot = new GnuplotInterface(); gnuplot->setaxislabel("x", "t"); gnuplot->setaxislabel("y", "v"); double v0 = 0.0; double dt = 0.1; double v = v0; int stepend = 10; int step = 0; Output(dt*(double)step, v, true); } gnuplot->injection("plot '-' title 'predicted', 1-exp(-x) \n"); gnuplot->injection(dt*(double)step, v); while(step < stepend){ v += (1.0 - v)*dt; step++; Output(dt*(double)step, v, true); gnuplot->injection(dt*(double)step, v); } gnuplot->injection("e\n"); delete gnuplot; return 0; - e shift + 7 PDF copy&paste

31 (1) (1) I (2) t dt stepend dt = 0.1 dt = 0.01 dt = t = 1 dt dt t=1 gnuplot Terminal x1, y1 x2, y2 gnuplot (plot data.txt ) x3, y3 set logscale x (y ) (2) 01FallingParticleImplicit v(t + t) = v(t) + (1 v(t)) t v(t + t) v(t + t) dt = 0.1

32 (1) I (1) t 1 1/10 1/10

33 (2) (2) 01FallingParticleImplicit v(t + t) = v(t) + t 1 + t #include <iostream> #include <cmath> #include "GnuplotInterface.h" void Output(double t, double v, bool display){...}; int main(int argc, const char * argv[]) {... while(step < stepend){ v = (v + dt)/(1.0 + dt); step++; Output(dt*(double)step, v, true); gnuplot->injection(dt*(double)step, v); }... }

34 (2) (2) v(t + t) = v(t) + (1 v(t)) t v(t + t) = v(t) + t 1 + t

35 t 1 v(t + t) = v(t) + 1 1! dv dt t t + 1 2! d 2 v dt 2 t t 2 + O( t 3 ) v(t + t) = v(t) + (1 v(t)) t v(t) + 1 1! dv dt t t + 1 2! d 2 v dt 2 t t 2 + O( t 3 ) = v(t) + (1 v(t)) t apple dv 1 d 2 v = 1 v(t) + dt 2! dt 2 t t t 1 + O( t 2 ) (1st-order accuracy) t 1

36 (3) II v(t + t) = v(t) + t 1 + t

37 t = n t ( n) v n = v(t) v n+1 = v(t + t) n

38 df dt = g(f) f n+1 t f n = g(f n k, f n ) (k > 0) (explicit scheme) (implicit scheme) f n+1 t f n = g(f n±k, f n ) (k > 0)

39 v n+1 = v n + (1 v n ) t v n+1 = v n + (1 v n+1 ) t t 1 Crank-Nicolson f n+1 t f n = g(f n+1 ) + g(f n ) 2

40 Crank-Nicolson v n+1 t v n = 1 2 (1 v n+1 ) + (1 v n ) v n+1 = vn vn t 1 + t 2 #include <iostream> #include <cmath> #include "GnuplotInterface.h" void Output(double t, double v, bool display){...}; int main(int argc, const char * argv[]) {... while(step < stepend){ v = (v + (1.0 - v*0.5)*dt)/(1.0 + dt*0.5); step++; Output(dt*(double)step, v, true); gnuplot->injection(dt*(double)step, v); }... }

41 Crank-Nicolson Crank-Nicolson

42 Adams-Bashforth Runge-Kutta Crank-Nicolson Adams-Bashforth f n+1 t f n = 3g(f n ) g(f n 1 ) 2 Runge-Kutta Runge-Kutta f (1) f n t/2 = g(f n ) f n+1 f n t = g(f (1) )

43 Adams-Bashforth Adams-Bashforth Runge-Kutta Runge-Kutta

44

45 t 1 t 2

46 (Numerical stability) t t = 0.1

47 gnuplot (1/4) ( ) explicit.txt implicit.txt Terminal gnuplot Terminal plot explicit.txt, implicit, 1-exp(-x) Terminal >

48 gnuplot (2/4) std::ofstream C fprintf (Terminal > Xcode ) ( ) ( ) int main(int argc, const char * argv[]) { std::ofstream output("data.txt");... output << dt*(double)step << " << v << " << std::endl; while(step < stepend){... step++; output << dt*(double)step << " << v << " << std::endl; }... std::cout ofstream return 0; }

49 gnuplot (3/4) gnuplot Xcode ( ) gnuplot plot 'data.txt' using 1:2 title 'explicit', '' using 1:3 title 'implicit' 1,2 ( data.txt ) v Crank-Nicolson C std::vector< > double v output std::vector<double> v {v0, v0}; output << dt*(double)step << " "; for(int i=0; i<v.size(); i++) output << v[i] << " "; output << std::endl;

50 gnuplot (3/4)... double Output(double t, double v, bool display){...}; int main(int argc, const char * argv[]) { std::ofstream output("data.txt"); ofstream GnuplotInterface* gnuplot = new GnuplotInterface(); gnuplot->setaxislabel("x", t"); gnuplot->setaxislabel("y", "v"); double v0 = 0.0; double dt = 0.1; std::vector<double> v {v0, v0}; std::vector int stepend = 10; int step = 0; output << dt*(double)step << " "; for(int i=0; i<v.size(); i++) output << v[i] << " "; output << std::endl; while(step < stepend){ for(int i=0; i<v.size(); i++){ switch (i) { case 0: v[i] += (1.0 - v[i])*dt; break; case 1: v[i] = (v[i] + dt)/(1.0 + dt); break; default: break; } } step++; output << dt*(double)step << " "; for(int i=0; i<v.size(); i++) output << v[i] << " "; output << std::endl; } gnuplot->injection("set key left top\n"); gnuplot->injection("plot 'data.txt' using 1:2 title 'explicit', '' using 1:3 title 'implicit', 1-exp(-x)\n"); for(int i=0; i<v.size(); i++) std::cout << Output(dt*(double)step, v[i], false) << ", "; delete gnuplot; gnuplot return 0; } switch

51 x m d2 x dt 2 = kx F = kx (k > 0) x x

52 dx dt = v dv dt =!2 x! = r k m x, v

53 dx dt = v x n+1 t x n = v n x n+1 = x n + v n t dv dt =!2 x v n+1 t v n =! 2 x n v n+1 = v n! 2 x n t x v

54 x(0) = x 0 = 1 v(0) = v 0 = 0! = 1 x(t) = cos(!t) T/4 v(t) =! sin(!t) T T = 2 /! T/4 10 t = T

55 #include <iostream> #include <cmath> #include "GnuplotInterface.h" int main(int argc, const char * argv[]) { GnuplotInterface* gnuplot = new GnuplotInterface(); gnuplot->setaxislabel("x", "t"); gnuplot->setaxislabel("y", "x"); } double x0 = 1.0; double v0 = 0.0; double omega = 1.0; double omega2= omega*omega; double x = x0; double v = v0; double T = 2.0*M_PI/omega; double dt = (T/4.0)*0.1; x 0 v 0!! 2 T = 2 /! gnuplot->setgraphrange("x", 0.0, T); int stepend = (int)(t/dt) + 1; int step = 0; gnuplot->injection("set key left bottom\n"); gnuplot->injection("plot '-' title 'predicted x', cos(x), 0 \n"); gnuplot->injection(dt*(double)step, x); while(step < stepend){ double xtmp = x + v*dt; double vtmp = v - omega2*x*dt; x = xtmp; v = vtmp; step++; gnuplot->injection(dt*(double)step, x); } gnuplot->injection("e\n"); delete gnuplot; return 0; 02OscillatingBody t = T x n+1 = x n + v n v n+1 = v n! 2 x n t t

56 (x) dt 1/10

57 (v)

58 Runge-Kutta Step 1 Step 2 dx dt = v x (1) t/2 x n = v n x n+1 t x n = v (1) dv dt =!2 x v (1) t/2 v n =! 2 x n v n+1 v n t =! 2 x (1) Runge-Kutta

59 Runge-Kutta

60 Runge-Kutta f (1) = f n + f (2) = f n + t 2 gn t 2 g(1) f (3) = f n + tg (2) f n+1 = f n + t 6 (gn + 2g (1) + 2g (2) + g (3) ) 20

61 dx dt = v x n+1 t x n = v n+1 dv dt =!2 x v n+1 t v n =! 2 x n+1

62 (x)

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

1 28 6 12 7 1 7.1...................................... 2 7.1.1............................... 2 7.1.2........................... 2 7.2...................................... 3 7.3...................................

More information

p12.dvi

p12.dvi 301 12 (2) : 1 (1) dx dt = f(x,t) ( (t 0,t 1,...,t N ) ) h k = t k+1 t k. h k k h. x(t k ) x k. : 2 (2) :1. step. 1 : explicit( ) : ξ k+1 = ξ k +h k Ψ(t k,ξ k,h k ) implicit( ) : ξ k+1 = ξ k +h k Ψ(t k,t

More information

1-4 int a; std::cin >> a; std::cout << "a = " << a << std::endl; C++( 1-4 ) stdio.h iostream iostream.h C++ include.h 1-4 scanf() std::cin >>

1-4 int a; std::cin >> a; std::cout << a =  << a << std::endl; C++( 1-4 ) stdio.h iostream iostream.h C++ include.h 1-4 scanf() std::cin >> 1 C++ 1.1 C C++ C++ C C C++ 1.1.1 C printf() scanf() C++ C hello world printf() 1-1 #include printf( "hello world\n" ); C++ 1-2 std::cout

More information

Condition DAQ condition condition 2 3 XML key value

Condition DAQ condition condition 2 3 XML key value Condition DAQ condition 2009 6 10 2009 7 2 2009 7 3 2010 8 3 1 2 2 condition 2 3 XML key value 3 4 4 4.1............................. 5 4.2...................... 5 5 6 6 Makefile 7 7 9 7.1 Condition.h.............................

More information

Microsoft Word - C.....u.K...doc

Microsoft Word - C.....u.K...doc C uwêííôöðöõ Ð C ÔÖÐÖÕ ÐÊÉÌÊ C ÔÖÐÖÕÊ C ÔÖÐÖÕÊ Ç Ê Æ ~ if eíè ~ for ÒÑÒ ÌÆÊÉÉÊ ~ switch ÉeÍÈ ~ while ÒÑÒ ÊÍÍÔÖÐÖÕÊ ~ 1 C ÔÖÐÖÕ ÐÊÉÌÊ uê~ ÏÒÏÑ Ð ÓÏÖ CUI Ô ÑÊ ÏÒÏÑ ÔÖÐÖÕÎ d ÈÍÉÇÊ ÆÒ Ö ÒÐÑÒ ÊÔÎÏÖÎ d ÉÇÍÊ

More information

double 2 std::cin, std::cout 1.2 C fopen() fclose() C++ std::fstream 1-3 #include <fstream> std::fstream fout; int a = 123; fout.open( "data.t

double 2 std::cin, std::cout 1.2 C fopen() fclose() C++ std::fstream 1-3 #include <fstream> std::fstream fout; int a = 123; fout.open( data.t C++ 1 C C++ C++ C C C++ 1.1 C printf() scanf() C++ C 1-1 #include int a; scanf( "%d", &a ); printf( "a = %d\n", a ); C++ 1-2 int a; std::cin >> a; std::cout

More information

r07.dvi

r07.dvi 19 7 ( ) 2019.4.20 1 1.1 (data structure ( (dynamic data structure 1 malloc C free C (garbage collection GC C GC(conservative GC 2 1.2 data next p 3 5 7 9 p 3 5 7 9 p 3 5 7 9 1 1: (single linked list 1

More information

ohp07.dvi

ohp07.dvi 19 7 ( ) 2019.4.20 1 (data structure) ( ) (dynamic data structure) 1 malloc C free 1 (static data structure) 2 (2) C (garbage collection GC) C GC(conservative GC) 2 2 conservative GC 3 data next p 3 5

More information

資料

資料 PC PC C VMwareをインストールする Tips: VmwareFusion *.vmx vhv.enable = TRUE Tips: Windows Hyper-V -rwxr-xr-x 1 masakazu staff 8552 7 29 13:18 a.out* -rw------- 1 masakazu staff 8552 7 29

More information

ohp03.dvi

ohp03.dvi 19 3 ( ) 2019.4.20 CS 1 (comand line arguments) Unix./a.out aa bbb ccc ( ) C main void int main(int argc, char *argv[]) {... 2 (2) argc argv argc ( ) argv (C char ) ( 1) argc 4 argv NULL. / a. o u t \0

More information

PowerPoint プレゼンテーション - 物理学情報処理演習

PowerPoint プレゼンテーション  -  物理学情報処理演習 物理学情報処理演習 6. C 言語 3 演算 制御文 gnuplot 本日の推奨作業 directory lesson06 2016 年 5 月 24 日 VER 20160524_3 6.1 演算 ( 算術以外 ) 6.2 制御文 参考文献 やさしい C++ 第 4 版高橋麻奈 ( 著 ) ソフトバンククリエイティブ プログラミング言語 C++ 第 4 版ビャーネ ストラウストラップ, Bjarne

More information

r03.dvi

r03.dvi 19 ( ) 019.4.0 CS 1 (comand line arguments) Unix./a.out aa bbb ccc ( ) C main void... argc argv argc ( ) argv (C char ) ( 1) argc 4 argv NULL. / a. o u t \0 a a \0 b b b \0 c c c \0 1: // argdemo1.c ---

More information

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó  ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡ (2018) 2018 5 17 0 0 if switch if if ( ) if ( 0) if ( ) if ( 0) if ( ) (0) if ( 0) if ( ) (0) ( ) ; if else if ( ) 1 else 2 if else ( 0) 1 if ( ) 1 else 2 if else ( 0) 1 if ( ) 1 else 2 (0) 2 if else

More information

SystemC言語概論

SystemC言語概論 SystemC CPU S/W 2004/01/29 4 SystemC 1 SystemC 2.0.1 CPU S/W 3 ISS SystemC Co-Simulation 2004/01/29 4 SystemC 2 ISS SystemC Co-Simulation GenericCPU_Base ( ) GenericCPU_ISS GenericCPU_Prog GenericCPU_CoSim

More information

A/B (2018/10/19) Ver kurino/2018/soft/soft.html A/B

A/B (2018/10/19) Ver kurino/2018/soft/soft.html A/B A/B (2018/10/19) Ver. 1.0 kurino@math.cst.nihon-u.ac.jp http://edu-gw2.math.cst.nihon-u.ac.jp/ kurino/2018/soft/soft.html 2018 10 19 A/B 1 2018 10 19 2 1 1 1.1 OHP.................................... 1

More information

273? C

273? C TSG Theoretical Science Group 273? C 2-1.................................. 2 -1. Windows Mac Mac UNIX CUI bash >_ Finder TSG No.273? 2 3 pwd ls cd ( ) change directory 3 TSG No.273? cd hoge cd hoge cd....../

More information

r08.dvi

r08.dvi 19 8 ( ) 019.4.0 1 1.1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( ) 1 next 1 prev 1 head cur tail head cur prev

More information

2008chom.pdf

2008chom.pdf CHomP Pawe l Pilarczyk 1 CHomP Computational Homology Project [3] OS Windows Mac Unix Linux [3] CHomP [3] 2 3 CHomP CHomP 4 5 C++ [1] 2 CHomP 1 2 K 1 = { A 1 A 2 A 3, A 1 A 2, A 2 A 3, A 1 A 3, A 3 A 4,

More information

GNUPLOT 28 3 15 UNIX Microsoft-Windows GNUPLOT 4 GNUPLOT 1 GNUPLOT 2 2 3 2.1 UNIX.......................................... 3 2.2 Windows........................................ 4 2.3..................................

More information

gnuplot.dvi

gnuplot.dvi gnuplot gnuplot 1 gnuplot exit 2 10 10 2.1 2 plot x plot sin(x) plot [-20:20] sin(x) plot [-20:20][0.5:1] sin(x), x, cos(x) + - * / ** 5 ** plot 2**x y =2 x sin(x) cos(x) exp(x) e x abs(x) log(x) log10(x)

More information

新版明解C言語 実践編

新版明解C言語 実践編 2 List - "max.h" a, b max List - max "max.h" #define max(a, b) ((a) > (b)? (a) : (b)) max List -2 List -2 max #include "max.h" int x, y; printf("x"); printf("y"); scanf("%d", &x); scanf("%d", &y); printf("max(x,

More information

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裶²ó ¨¡ À©¸æ¹½Â¤¡§·«¤êÊÖ¤· ¨¡

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裶²ó  ¨¡ À©¸æ¹½Â¤¡§·«¤êÊÖ¤· ¨¡ (2018) 2018 5 24 ( ) while ( ) do while ( ); for ( ; ; ) while int i = 0; while (i < 100) { printf("i = %3d\n", i); i++; while int i = 0; i while (i < 100) { printf("i = %3d\n", i); i++; while int i =

More information

2.2 Sage I 11 factor Sage Sage exit quit 1 sage : exit 2 Exiting Sage ( CPU time 0m0.06s, Wall time 2m8.71 s). 2.2 Sage Python Sage 1. Sage.sage 2. sa

2.2 Sage I 11 factor Sage Sage exit quit 1 sage : exit 2 Exiting Sage ( CPU time 0m0.06s, Wall time 2m8.71 s). 2.2 Sage Python Sage 1. Sage.sage 2. sa I 2017 11 1 SageMath SageMath( Sage ) Sage Python Sage Python Sage Maxima Maxima Sage Sage Sage Linux, Mac, Windows *1 2 Sage Sage 4 1. ( sage CUI) 2. Sage ( sage.sage ) 3. Sage ( notebook() ) 4. Sage

More information

1 C STL(1) C C C libc C C C++ STL(Standard Template Library ) libc libc C++ C STL libc STL iostream Algorithm libc STL string vector l

1 C STL(1) C C C libc C C C++ STL(Standard Template Library ) libc libc C++ C STL libc STL iostream Algorithm libc STL string vector l C/C++ 2007 6 18 1 C STL(1) 2 1.1............................................... 2 1.2 stdio................................................ 3 1.3.......................................... 10 2 11 2.1 sizeof......................................

More information

GNUPLOT GNUPLOT GNUPLOT 1 ( ) GNUPLO

GNUPLOT GNUPLOT GNUPLOT 1 ( ) GNUPLO GNUPLOT 2004 10 6 UNIX Microsoft-Windows GNUPLOT 3.7 GNUPLOT 1 GNUPLOT 2 2 2 3 4 4 7 5 9 6 10 7 12 8 13 9 14 10 17 1 GNUPLOT............................... 3 2 MS-Windows GNUPLOT.................... 3

More information

ohp08.dvi

ohp08.dvi 19 8 ( ) 2019.4.20 1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: 2 (2) NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( 2) 3 (3) head cur tail head cur prev data

More information

1.3 2 gnuplot> set samples gnuplot> plot sin(x) sin gnuplot> plot [0:6.28] [-1.5:1.5] sin(x) gnuplot> plot [-6.28:6.28] [-1.5:1.5] sin(x),co

1.3 2 gnuplot> set samples gnuplot> plot sin(x) sin gnuplot> plot [0:6.28] [-1.5:1.5] sin(x) gnuplot> plot [-6.28:6.28] [-1.5:1.5] sin(x),co gnuplot 8 gnuplot 1 1.1 gnuplot gnuplot 2D 3D gnuplot ( ) gnuplot UNIX Windows Machintosh Excel gnuplot C 1.2 web gnuplot $ gnuplot gnuplot gnuplot> exit 1 1.3 2 gnuplot> set samples 1024 1024 gnuplot>

More information

cpp1.dvi

cpp1.dvi 2017 c 1 C++ (1) C C++, C++, C 11, 12 13 (1) 14 (2) 11 1 n C++ //, [List 11] 1: #include // C 2: 3: int main(void) { 4: std::cout

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

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

第5回お試しアカウント付き並列プログラミング講習会

第5回お試しアカウント付き並列プログラミング講習会 qstat -l ID (qstat -f) qscript ID BATCH REQUEST: 253443.batch1 Name: test.sh Owner: uid=32637, gid=30123 Priority: 63 State: 1(RUNNING) Created at: Tue Jun 30 05:36:24 2009 Started at: Tue Jun 30 05:36:27

More information

3.1 stdio.h iostream List.2 using namespace std C printf ( ) %d %f %s %d C++ cout cout List.2 Hello World! cout << float a = 1.2f; int b = 3; cout <<

3.1 stdio.h iostream List.2 using namespace std C printf ( ) %d %f %s %d C++ cout cout List.2 Hello World! cout << float a = 1.2f; int b = 3; cout << C++ C C++ 1 C++ C++ C C++ C C++? C C++ C *.c *.cpp C cpp VC C++ 2 C++ C++ C++ [1], C++,,1999 [2],,,2001 [3], ( )( ),,2001 [4] B.W. /D.M.,, C,,1989 C Web [5], http://kumei.ne.jp/c_lang/ 3 Hello World Hello

More information

1 1 Gnuplot gnuplot Windows gnuplot gp443win32.zip gnuplot binary, contrib, demo, docs, license 5 BUGS, Chang

1 1 Gnuplot gnuplot   Windows gnuplot gp443win32.zip gnuplot binary, contrib, demo, docs, license 5 BUGS, Chang Gnuplot で微分積分 2011 年度前期 数学解析 I 講義資料 (2011.6.24) 矢崎成俊 ( 宮崎大学 ) 1 1 Gnuplot gnuplot http://www.gnuplot.info/ Windows gnuplot 2011 6 22 4.4.3 gp443win32.zip gnuplot binary, contrib, demo, docs, license 5

More information

C による数値計算法入門 ( 第 2 版 ) 新装版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 新装版 1 刷発行時のものです.

C による数値計算法入門 ( 第 2 版 ) 新装版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます.  このサンプルページの内容は, 新装版 1 刷発行時のものです. C による数値計算法入門 ( 第 2 版 ) 新装版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. http://www.morikita.co.jp/books/mid/009383 このサンプルページの内容は, 新装版 1 刷発行時のものです. i 2 22 2 13 ( ) 2 (1) ANSI (2) 2 (3) Web http://www.morikita.co.jp/books/mid/009383

More information

x1 GNUPLOT 2 x4 12 x1 Gnuplot Gnuplot,,. gnuplot, PS (Post Script), PS ghostview.,.,,,.,., gnuplot,,, (x2). x1.1 Gnuplot (gnuplot, quit) gnuplot,. % g

x1 GNUPLOT 2 x4 12 x1 Gnuplot Gnuplot,,. gnuplot, PS (Post Script), PS ghostview.,.,,,.,., gnuplot,,, (x2). x1.1 Gnuplot (gnuplot, quit) gnuplot,. % g Gnuplot Shigetoshi Yazaki gnuplot(ver. 3.0).,.,. ( ), (, ) 3. x1 Gnuplot 2 x1.1 Gnuplot (gnuplot, quit) : : : : : : : : : : : : : 2 x1.2 (plot) : : : : : : : : : : : : : : : : : : : : : : : : : : : : :

More information

新・明解C言語 実践編

新・明解C言語 実践編 第 1 章 見 21 1-1 見えないエラー 見 List 1-1 "max2x1.h" a, b max2 List 1-1 chap01/max2x1.h max2 "max2x1.h" #define max2(a, b) ((a) > (b)? (a) : (b)) max2 List 1-2 List 1-2 chap01/max2x1test.c max2 #include

More information

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D II 8 2003 11 12 1 6 ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 Daisuke 8 =>. 73 Daisuke 35 Hiroshi 64 Ichiro 87 Junko

More information

Debian での数学ことはじめ。 - gnuplot, Octave, R 入門

Debian での数学ことはじめ。 - gnuplot, Octave, R 入門 .... Debian gnuplot, Octave, R mkouhei@debian.or.jp IRC nick: mkouhei 2009 11 14 OOo OS diff git diff --binary gnuplot GNU Octave GNU R gnuplot LaTeX GNU Octave gnuplot MATLAB 1 GNU R 1 MATLAB (clone)

More information

cpall.dvi

cpall.dvi 55 7 gnuplot gnuplot Thomas Williams Colin Kelley Unix Windows MacOS gnuplot ( ) ( ) gnuplot gnuplot 7.1 gnuplot gnuplot () PC(Windows MacOS ) gnuplot http://www.gnuplot.info gnuplot 7.2 7.2.1 gnuplot

More information

3. :, c, ν. 4. Burgers : t + c x = ν 2 u x 2, (3), ν. 5. : t + u x = ν 2 u x 2, (4), c. 2 u t 2 = c2 2 u x 2, (5) (1) (4), (1 Navier Stokes,., ν. t +

3. :, c, ν. 4. Burgers : t + c x = ν 2 u x 2, (3), ν. 5. : t + u x = ν 2 u x 2, (4), c. 2 u t 2 = c2 2 u x 2, (5) (1) (4), (1 Navier Stokes,., ν. t + B: 2016 12 2, 9, 16, 2017 1 6 1,.,,,,.,.,,,., 1,. 1. :, ν. 2. : t = ν 2 u x 2, (1), c. t + c x = 0, (2). e-mail: iwayama@kobe-u.ac.jp,. 1 3. :, c, ν. 4. Burgers : t + c x = ν 2 u x 2, (3), ν. 5. : t +

More information

- - http://168iroha.net 018 10 14 i 1 1 1.1.................................................... 1 1.................................................... 7.1................................................

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

C:/KENAR/0p1.dvi

C:/KENAR/0p1.dvi 2{3. 53 2{3 [ ] 4 2 1 2 10,15 m 10,10 m 2 2 54 2 III 1{I U 2.4 U r (2.16 F U F =, du dt du dr > 0 du dr < 0 O r 0 r 2.4: 1 m =1:00 10 kg 1:20 10 kgf 8:0 kgf g =9:8 m=s 2 (a) x N mg 2.5: N 2{3. 55 (b) x

More information

-2 gnuplot( ) j ( ) gnuplot /shell/myscript 1

-2 gnuplot( ) j ( ) gnuplot /shell/myscript 1 -2 gnuplot( ) j 2006 05 03 2006 05 12 2006 05 09 2 ( ) gnuplot /shell/myscript 1 1 shell script Level 1 myls #!/bin/sh # nowdir= pwd # if [ -f $1 -o -z $1 ] ; then echo "Enter pass" echo "ex) myls.sh./"

More information

3. :, c, ν. 4. Burgers : u t + c u x = ν 2 u x 2, (3), ν. 5. : u t + u u x = ν 2 u x 2, (4), c. 2 u t 2 = c2 2 u x 2, (5) (1) (4), (1 Navier Stokes,.,

3. :, c, ν. 4. Burgers : u t + c u x = ν 2 u x 2, (3), ν. 5. : u t + u u x = ν 2 u x 2, (4), c. 2 u t 2 = c2 2 u x 2, (5) (1) (4), (1 Navier Stokes,., B:,, 2017 12 1, 8, 15, 22 1,.,,,,.,.,,,., 1,. 1. :, ν. 2. : u t = ν 2 u x 2, (1), c. u t + c u x = 0, (2), ( ). 1 3. :, c, ν. 4. Burgers : u t + c u x = ν 2 u x 2, (3), ν. 5. : u t + u u x = ν 2 u x 2,

More information

£Ã¥×¥í¥°¥é¥ß¥ó¥°(2018) - Âè11²ó – ½ÉÂꣲ¤Î²òÀ⡤±é½¬£² –

£Ã¥×¥í¥°¥é¥ß¥ó¥°(2018) - Âè11²ó – ½ÉÂꣲ¤Î²òÀ⡤±é½¬£² – (2018) 11 2018 12 13 2 g v dv x dt = bv x, dv y dt = g bv y (1) b v 0 θ x(t) = v 0 cos θ ( 1 e bt) (2) b y(t) = 1 ( v 0 sin θ + g ) ( 1 e bt) g b b b t (3) 11 ( ) p14 2 1 y 4 t m y > 0 y < 0 t m1 h = 0001

More information

解きながら学ぶC++入門編

解きながら学ぶC++入門編 !... 38!=... 35 "... 112 " "... 311 " "... 4, 264 #... 371 #define... 126, 371 #endif... 369 #if... 369 #ifndef... 369 #include... 3, 311 #undef... 371 %... 17, 18 %=... 85 &... 222 &... 203 &&... 40 &=...

More information

pptx

pptx iphone 2010 8 18 C xkozima@myu.ac.jp C Hello, World! Hello World hello.c! printf( Hello, World!\n );! os> ls! hello.c! os> cc hello.c o hello! os> ls! hello!!hello.c! os>./hello! Hello, World!! os>! os>

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

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

yacc.dvi

yacc.dvi 2017 c 8 Yacc Mini-C C/C++, yacc, Mini-C, run,, Mini-C 81 Yacc Yacc, 1, 2 ( ), while ::= "while" "(" ")" while yacc 1: st while : lex KW WHILE lex LPAREN expression lex RPAREN statement 2: 3: $$ = new

More information

SystemC 2.0を用いた簡易CPUバスモデルの設計

SystemC 2.0を用いた簡易CPUバスモデルの設計 SystemC 2.0 CPU CPU CTD&SW CT-PF 2002/1/23 1 CPU BCA UTF GenericCPU IO (sc_main) 2002/1/23 2 CPU CPU CQ 1997 11 Page 207 4 Perl Verilog-HDL CPU / Verilog-HDL SystemC 2.0 (asm) ROM (test.hex) 2002/1/23

More information

1.1 ft t 2 ft = t 2 ft+ t = t+ t 2 1.1 d t 2 t + t 2 t 2 = lim t 0 t = lim t 0 = lim t 0 t 2 + 2t t + t 2 t 2 t + t 2 t 2t t + t 2 t 2t + t = lim t 0

1.1 ft t 2 ft = t 2 ft+ t = t+ t 2 1.1 d t 2 t + t 2 t 2 = lim t 0 t = lim t 0 = lim t 0 t 2 + 2t t + t 2 t 2 t + t 2 t 2t t + t 2 t 2t + t = lim t 0 A c 2008 by Kuniaki Nakamitsu 1 1.1 t 2 sin t, cos t t ft t t vt t xt t + t xt + t xt + t xt t vt = xt + t xt t t t vt xt + t xt vt = lim t 0 t lim t 0 t 0 vt = dxt ft dft dft ft + t ft = lim t 0 t 1.1

More information

ex01.dvi

ex01.dvi ,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) double

More information

2 T 1 N n T n α = T 1 nt n (1) α = 1 100% OpenMP MPI OpenMP OpenMP MPI (Message Passing Interface) MPI MPICH OpenMPI 1 OpenMP MPI MPI (trivial p

2 T 1 N n T n α = T 1 nt n (1) α = 1 100% OpenMP MPI OpenMP OpenMP MPI (Message Passing Interface) MPI MPICH OpenMPI 1 OpenMP MPI MPI (trivial p 22 6 22 MPI MPI 1 1 2 2 3 MPI 3 4 7 4.1.................................. 7 4.2 ( )................................ 10 4.3 (Allreduce )................................. 12 5 14 5.1........................................

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

: (EQS) /EQUATIONS V1 = 30*V F1 + E1; V2 = 25*V *F1 + E2; V3 = 16*V *F1 + E3; V4 = 10*V F2 + E4; V5 = 19*V99

: (EQS) /EQUATIONS V1 = 30*V F1 + E1; V2 = 25*V *F1 + E2; V3 = 16*V *F1 + E3; V4 = 10*V F2 + E4; V5 = 19*V99 218 6 219 6.11: (EQS) /EQUATIONS V1 = 30*V999 + 1F1 + E1; V2 = 25*V999 +.54*F1 + E2; V3 = 16*V999 + 1.46*F1 + E3; V4 = 10*V999 + 1F2 + E4; V5 = 19*V999 + 1.29*F2 + E5; V6 = 17*V999 + 2.22*F2 + E6; CALIS.

More information

2017 p vs. TDGL 4 Metropolis Monte Carlo equation of continuity s( r, t) t + J( r, t) = 0 (79) J s flux (67) J (79) J( r, t) = k δf δs s( r,

2017 p vs. TDGL 4 Metropolis Monte Carlo equation of continuity s( r, t) t + J( r, t) = 0 (79) J s flux (67) J (79) J( r, t) = k δf δs s( r, 27 p. 47 7 7. vs. TDGL 4 Metropolis Monte Carlo equation of continuity s( r, t) t + J( r, t) = (79) J s flux (67) J (79) J( r, t) = k δf δs s( r, t) t = k δf δs (59) TDGL (8) (8) k s t = [ T s s 3 + ξ

More information

/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental structures /06/14(Tue) / Memory Management /06/1

/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental structures /06/14(Tue) / Memory Management /06/1 I117 II I117 PROGRAMMING PRACTICE II 2 MEMORY MANAGEMENT 2 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara yasu@jaist.ac.jp / SCHEDULE 1. 2011/06/07(Tue) / Basic of Programming

More information

(STL) STL 1 (deta structure) (algorithm) (deta structure) 2 STL STL (Standard Template Library) 2.1 STL STL ( ) vector<int> x; for(int i = 0; i < 10;

(STL) STL 1 (deta structure) (algorithm) (deta structure) 2 STL STL (Standard Template Library) 2.1 STL STL ( ) vector<int> x; for(int i = 0; i < 10; (STL) STL 1 (deta structure) (algorithm) (deta structure) 2 STL STL (Standard Template Library) 2.1 STL STL ( ) vector x; for(int i = 0; i < 10; ++i) x.push_back(i); vector STL x.push_back(i) STL

More information

1.ppt

1.ppt /* * Program name: hello.c */ #include int main() { printf( hello, world\n ); return 0; /* * Program name: Hello.java */ import java.io.*; class Hello { public static void main(string[] arg)

More information

joho07-1.ppt

joho07-1.ppt 0xbffffc5c 0xbffffc60 xxxxxxxx xxxxxxxx 00001010 00000000 00000000 00000000 01100011 00000000 00000000 00000000 xxxxxxxx x y 2 func1 func2 double func1(double y) { y = y + 5.0; return y; } double func2(double*

More information

Unix * 3 PC 2 Linux, Mac *4 Windows Cygwin Cygwin gnuplot Cygwin unix emulator online gnuplot *5 matplotlib *6 SuperMongo *7 gnuplot gnuplot OS *8 Uni

Unix * 3 PC 2 Linux, Mac *4 Windows Cygwin Cygwin gnuplot Cygwin unix emulator online gnuplot *5 matplotlib *6 SuperMongo *7 gnuplot gnuplot OS *8 Uni 2015 8 1 ( ) Unix 1 *1 Unix Unix Unix Perl, Python *2 Unix 2 PC gnuplot *1 100 10 10 6 10 = 10 7 1 1/3 3 10 7 10 7.5 1 24 3600 = (30 6)(30 + 6) 100 = 86400 1 10 7.5 *2 Perl, Python Python 1 Unix * 3 PC

More information

‚æ4›ñ

‚æ4›ñ ( ) ( ) ( ) A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 (OUS) 9 26 1 / 28 ( ) ( ) ( ) A B C D Z a b c d z 0 1 2 9 (OUS) 9

More information

error_g1.eps

error_g1.eps Runge-Kutta Method Runge-Kutta Method x n+ = x n +hf(t n x n ) dx dt dx x(t+h) x(t) (t) = lim dt h h t = t n h > dx dt (t x(t n +h) x(t n ) n) = lim x(t n+) x(t n ) h h h x = f(tx) x(t n+ ) x(t n ) f(t

More information

1.3 ( ) ( ) C

1.3 ( ) ( ) C 1 1.1 (Data Base) (Container) C++ Java 1.2 1 1.3 ( ) ( ) 1. 2. 3. C++ 2 2.1 2.2 2.3 2 C Fortran C++ Java 3 3.1 (Vector) 1. 2. ( ) 3.2 3 3.3 C++ C++ STL C++ (Template) vector vector< > ; int arrayint vector

More information

2014計算機実験1_1

2014計算機実験1_1 H26 1 1 1 seto@ics.nara-wu.ac.jp 数学モデリングのプロセス 問題点の抽出 定義 仮定 数式化 万有引力の法則 m すべての物体は引き合う r mm F =G 2 r M モデルの検証 モデルによる 説明 将来予測 解釈 F: 万有引力 (kg m s-2) G: 万有引力定数 (m s kg ) 解析 数値計算 M: 地球の質量 (kg) により解を得る m: 落下する物質の質量

More information

Microsoft PowerPoint - 14Gnuplot.ppt

Microsoft PowerPoint - 14Gnuplot.ppt Gnuplot との連携 Gnuplot による関数の描画 Gnuplot によるデータのプロット Gnuplot による 3-D グラフの描画 Gnuplot による 3-D データのプロット 今日のポイント グラフ描画ソフト gnuplot を体験してみよう Gnuplot とは グラフ描画専用のフリーウェア Windows 版の名称は wgnuplot インストールはフォルダごとコピーするだけ

More information

web07.dvi

web07.dvi 93 7 MATLAB Octave MATLAB Octave MAT MATLAB Octave copyright c 2004 Tatsuya Kitamura / All rights reserved. 94 7 7.1 UNIX Windows pwd Print Working Directory >> pwd ans = /home/kitamura/matlab pwd cd Change

More information

PowerPoint プレゼンテーション - 物理学情報処理演習

PowerPoint プレゼンテーション  -  物理学情報処理演習 物理学情報処理演習 8. C 言語 5 文字列 ポインタ 2016 年 6 月 7 日 ver20160607_2 本日の推奨作業 directory lesson08 8.1 文字列 8.2 ポインタ 参考文献 やさしい C++ 第 4 版高橋麻奈 ( 著 ) ソフトバンククリエイティブ プログラミング言語 C++ 第 4 版ビャーネ ストラウストラップ, Bjarne Stroustrup, 柴田望洋

More information

Specview Specview Specview STSCI(Space Telescope SCience Institute) VO Specview Web page htt

Specview Specview Specview STSCI(Space Telescope SCience Institute) VO Specview Web page   htt Specview Specview Specview STSCI(Space Telescope SCience Institute) VO Specview Web page http://www.stsci.edu/resources/software_hardware/specview http://specview.stsci.edu/javahelp/main.html Specview

More information

Intel® Compilers Professional Editions

Intel® Compilers Professional Editions 2007 6 10.0 * 10.0 6 5 Software &Solutions group 10.0 (SV) C++ Fortran OpenMP* OpenMP API / : 200 C/C++ Fortran : OpenMP : : : $ cat -n main.cpp 1 #include 2 int foo(const char *); 3 int main()

More information

HABOC manual

HABOC manual HABOC manual Version 2.0 takada@cr.scphys.kyoto-u.ac.jp HABOC とは Event by event 解析用の Framework C++ による coding ANL や FULL の C++ 版を目標 ANL/FULL は Object Oriented な設計概念なので C++ と相性が良い Histogram や視覚化には ROOT(http://root.cern.ch)

More information

ex01.dvi

ex01.dvi ,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) { double

More information

BW BW

BW BW Induced Sorting BW 11T2042B 2015 3 23 1 1 1.1................................ 1 1.2................................... 1 2 BW 1 2.1..................................... 2 2.2 BW.................................

More information

2 1 Mathematica Mathematica Mathematica Mathematica Windows Mac *1 1.1 1.1 Mathematica 9-1 Expand[(x + y)^7] (x + y) 7 x y Shift *1 Mathematica 1.12

2 1 Mathematica Mathematica Mathematica Mathematica Windows Mac *1 1.1 1.1 Mathematica 9-1 Expand[(x + y)^7] (x + y) 7 x y Shift *1 Mathematica 1.12 Chapter 1 Mathematica Mathematica Mathematica 1.1 Mathematica Mathematica (Wolfram Research) Windows, Mac OS X, Linux OS Mathematica 88 2012 11 9 2 Mathematica 2 1.2 Mathematica Mathematica 2 1 Mathematica

More information

Introduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for

Introduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for Introduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for embedded systems that use microcontrollers (MCUs)

More information

LAN Copyright c Daikoku Manabu This tutorial is licensed under a Creative Commons Attribution 2.1 Japan License

LAN Copyright c Daikoku Manabu This tutorial is licensed under a Creative Commons Attribution 2.1 Japan License LAN 2014 3 19 Copyright c 1993 2014 Daikoku Manabu This tutorial is licensed under a Creative Commons Attribution 2.1 Japan License. 1 2 1.1................................... 2 1.2.........................

More information

fp.gby

fp.gby 1 1 2 2 3 2 4 5 6 7 8 9 10 11 Haskell 12 13 Haskell 14 15 ( ) 16 ) 30 17 static 18 (IORef) 19 20 OK NG 21 Haskell (+) :: Num a => a -> a -> a sort :: Ord a => [a] -> [a] delete :: Eq a => a -> [a] -> [a]

More information

C 資料 電脳梁山泊烏賊塾 ファイルの入出力 C++ のバイナリファイル入出力 初めに 此処では Visual Studio 2017 を起動し 新しいプロジェクトで Visual C++ の Windows デスクトップを選択し Windows コンソールアプリケーションを作成する

C 資料 電脳梁山泊烏賊塾 ファイルの入出力 C++ のバイナリファイル入出力 初めに 此処では Visual Studio 2017 を起動し 新しいプロジェクトで Visual C++ の Windows デスクトップを選択し Windows コンソールアプリケーションを作成する ファイルの入出力 C++ のバイナリファイル入出力 初めに 此処では Visual Studio 2017 を起動し 新しいプロジェクトで Visual C++ の Windows デスクトップを選択し Windows コンソールアプリケーションを作成する 使用クラス C++ の場合 ファイルの入出力に使用するクラスは ifstream ofstream fstream の 3 種類が有り 頭に i(input)

More information

sim98-8.dvi

sim98-8.dvi 8 12 12.1 12.2 @u @t = @2 u (1) @x 2 u(x; 0) = (x) u(0;t)=u(1;t)=0fort 0 1x, 1t N1x =1 x j = j1x, t n = n1t u(x j ;t n ) Uj n U n+1 j 1t 0 U n j =1t=(1x) 2 = U n j+1 0 2U n j + U n j01 (1x) 2 (2) U n+1

More information

4 2018 5 1 1 1 1.1.............................. 1 1.1.1....................... 1 1.1.2.................... 1 1.2...................... 1 1.2.1........................... 1 1.2.2............................

More information

j x j j j + 1 l j l j = x j+1 x j, n x n x 1 = n 1 l j j=1 H j j + 1 l j l j E

j x j j j + 1 l j l j = x j+1 x j, n x n x 1 = n 1 l j j=1 H j j + 1 l j l j E 8 9 7 6 4 2 3 5 1 j x j j j + 1 l j l j = x j+1 x j, n x n x 1 = n 1 l j j=1 H j j + 1 l j l j E a n 1 H = ae l j, j=1 l j = x j+1 x j, x n x 1 = n 1 j=1 l j, l j = ±l l > 0) n 1 H = ϵ l j, j=1 ϵ e x x

More information

tebiki00.dvi

tebiki00.dvi (Linux) [ UNIX ] CMD Workshop ( ) 1 *********************************************************************** * Linux PC-UNIX UNIX * * 99% FreeBSD BSD PC-UNIX * * * ***********************************************************************

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

Microsoft PowerPoint - kougi9.ppt

Microsoft PowerPoint - kougi9.ppt C プログラミング演習 第 9 回ポインタとリンクドリストデータ構造 1 今まで説明してきた変数 #include "stdafx.h" #include int _tmain(int argc, _TCHAR* argv[]) { double x; double y; char buf[256]; int i; double start_x; double step_x; FILE*

More information

tuat1.dvi

tuat1.dvi ( 1 ) http://ist.ksc.kwansei.ac.jp/ tutimura/ 2012 6 23 ( 1 ) 1 / 58 C ( 1 ) 2 / 58 2008 9 2002 2005 T E X ptetex3, ptexlive pt E X UTF-8 xdvi-jp 3 ( 1 ) 3 / 58 ( 1 ) 4 / 58 C,... ( 1 ) 5 / 58 6/23( )

More information

XMPによる並列化実装2

XMPによる並列化実装2 2 3 C Fortran Exercise 1 Exercise 2 Serial init.c init.f90 XMP xmp_init.c xmp_init.f90 Serial laplace.c laplace.f90 XMP xmp_laplace.c xmp_laplace.f90 #include int a[10]; program init integer

More information

本 日 の 授 業 内 容 最 低 限 覚 えるべきUNIXコマンド pwd, ls, mkdir, cd, cp, rm, mv テキストエディタの 簡 単 な 使 い 方 テキストエディット, Jedit X,Emacs C 言 語 プログラミングの 初 歩 hello, world を 画 面

本 日 の 授 業 内 容 最 低 限 覚 えるべきUNIXコマンド pwd, ls, mkdir, cd, cp, rm, mv テキストエディタの 簡 単 な 使 い 方 テキストエディット, Jedit X,Emacs C 言 語 プログラミングの 初 歩 hello, world を 画 面 情 報 処 理 技 法 (Cプログラミング)I 第 2 回 ー UNIXの 基 本 (2) C 言 語 の 初 歩 ー 担 当 : 荻 田 武 史 本 日 の 授 業 内 容 最 低 限 覚 えるべきUNIXコマンド pwd, ls, mkdir, cd, cp, rm, mv テキストエディタの 簡 単 な 使 い 方 テキストエディット, Jedit X,Emacs C 言 語 プログラミングの

More information

course pptx

course pptx ParaView () 20105141CAE OPENFOAM (R) is a registered trade mark of OpenCFD Limited, the producer of the OpenFOAM software and owner of the OPENFOAM (R) and OpenCFD (R) trade marks. This offering is not

More information

0.2 Button TextBox: menu tab 2

0.2 Button TextBox: menu tab 2 Specview VO 2012 2012/9/27 Specview Specview STSCI(Space Telescope SCience Institute) VO Specview Web page http://www.stsci.edu/resources/software hardware/specview http://specview.stsci.edu/javahelp/main.html

More information

WinHPC ppt

WinHPC ppt MPI.NET C# 2 2009 1 20 MPI.NET MPI.NET C# MPI.NET C# MPI MPI.NET 1 1 MPI.NET C# Hello World MPI.NET.NET Framework.NET C# API C# Microsoft.NET java.net (Visual Basic.NET Visual C++) C# class Helloworld

More information

2008 IIA (program) pro(before)+gram(write) (artificial language) (programming languege) (programming) (machine language) (assembly language) ( )

2008 IIA (program) pro(before)+gram(write) (artificial language) (programming languege) (programming) (machine language) (assembly language) ( ) 2008 IIA 1 1.1 (program) pro(before)+gram(write) (artificial language) (programming languege) (programming) (machine language) (assembly language) () (high-level language) 3 (machine language) (CPU) 0

More information

86 6 r (6) y y d y = y 3 (64) y r y r y r ϕ(x, y, y,, y r ) n dy = f(x, y) (6) 6 Lipschitz 6 dy = y x c R y(x) y(x) = c exp(x) x x = x y(x ) = y (init

86 6 r (6) y y d y = y 3 (64) y r y r y r ϕ(x, y, y,, y r ) n dy = f(x, y) (6) 6 Lipschitz 6 dy = y x c R y(x) y(x) = c exp(x) x x = x y(x ) = y (init 8 6 ( ) ( ) 6 ( ϕ x, y, dy ), d y,, dr y r = (x R, y R n ) (6) n r y(x) (explicit) d r ( y r = ϕ x, y, dy ), d y,, dr y r y y y r (6) dy = f (x, y) (63) = y dy/ d r y/ r 86 6 r (6) y y d y = y 3 (64) y

More information

解きながら学ぶC言語

解きながら学ぶC言語 printf 2-5 37 52 537 52 printf("%d\n", 5 + 37); 5370 source program source file.c ex00.c 0 comment %d d 0 decimal -2 -p.6 3-2 5 37 5 37-22 537 537-22 printf("537%d\n", 5-37); function function call ( )argument,

More information

ohp11.dvi

ohp11.dvi 19 11 ( ) 2019.4.20 1 / ( ) n O(n 2 ) O(n 2 ) ( ) 1 d n 1 n logn O(nlogn) n ( n logn C ) 2 ( ) ( merge) 2 1 1 3 1 4 5 4 2 3 7 9 7 1 2 3 4 5 7 9 1: 2 ivec merge 3 ( ) (2) int *ivec_new(int size) { int *a

More information

r11.dvi

r11.dvi 19 11 ( ) 2019.4.20 1 / 1.1 ( n n O(n 2 O(n 2 ) ( 1 d n 1 n logn O(nlogn n ( n logn C 1.2 ( ( merge 2 1 1 3 1 4 5 4 2 3 7 9 7 1 2 3 4 5 7 9 1: 2 ivec merge int *ivec_new(int size) { int *a = (int*)malloc((size+1)

More information

Informatics 2010.key

Informatics 2010.key http://math.sci.hiroshima-u.ac.jp/ ~ryo/lectures/informatics2010/ 1 2 C ATM etc. etc. (Personal Computer) 3 4 Input Output Device Central Processing Unit I/O CPU Memory 5 6 (CPU),,... etc. C, Java, Fortran...

More information