80 likes | 287 Views
2006 년 2 학기 대학원 강의. 영상레이더 간섭기법. 강원대학교 지구물리학과 이훈열 교수. 강의 계획. 매주 수요일 3-6 시 강의 내용 C (cygwin, gcc, vi, gnuplot) FFT (1D and 2D, convolution, correlation) SAR (eSAR Processor) InSAR (eInSAR Processor) 컴퓨터 실습 위주의 강의. Cygwin. Linux-like environment for Windows Why cygwin? Free
E N D
2006년 2학기 대학원 강의 영상레이더 간섭기법 강원대학교 지구물리학과 이훈열 교수
강의 계획 • 매주 수요일 3-6시 • 강의 내용 • C (cygwin, gcc, vi, gnuplot) • FFT (1D and 2D, convolution, correlation) • SAR (eSAR Processor) • InSAR (eInSAR Processor) • 컴퓨터 실습 위주의 강의
Cygwin • Linux-like environment for Windows • Why cygwin? • Free • Windows applications • Website: www.cygwin.com
Cygwin Setup • Setup.exe • Install from the internet • Install for All Users • Root directory: f:\cygwin • Default text file type: Unix/binary [RECOMMENDED] • Select FTP site • Package selection: • +Devel -> gcc (GCC C compiler) • +Editors -> vim (a text editor) • +Graphics -> gnuplot • +Shells -> bash (c shell) • +System -> procps (top: system monitoring) • +Text -> more (file viewer) • +X11 -> xorg-x11-base
Cygwin Setup • Text Editor: WordPad • Edit .bash_profile # Set PATH so it includes user's private bin if it exists if [ -d "${HOME}/bin" ] ; then PATH=./:${HOME}/bin:${PATH} fi • Edit .bashrc alias dir='ls -alF ‘ • Try linux commands • cd, ls, man, dir, cc, pwd, top, startx
gnuplot test • Try gnuplot cygwin> startx & In X-terminal, cygwinx> gnuplot gnuplot> plot sin(x) gnuplot> plot [-5:5] [-2:2] cos(x) gnuplot> splot cos(x*y) gnuplot> replot sin(x*y) gnuplot> help gnuplot> help plotting
Gcc – Hello World • Text editor: WordPad • Edit hello.c #include <stdio.h> main() { printf(“Hello World!!\n”); } • Compile and run cygwin>cc –o hello hello.c cygwin> hello Hello World!!
Gcc & gnuplot • Edit plot1.c #include <stdio.h> main() { FILE *fp; int i; double pi; pi=4.*atan(1.); fp=fopen(“plot1.dat”, “w”); for(i=0; i<100; i++) { fprintf(fp, “%d %lf\n”, i, sin(2*pi*i/50)); } fclose(fp); } • Compile, run and plot cygwin>cc –o plot1 plot1.dat cygwin>startx & cygwinx>gnuplot gnuplot>plot “plot1.dat” w l gnuplot>replot sin(2*pi*x/50)