03.12.2012 Views

C++ for Scientists - Technische Universität Dresden

C++ for Scientists - Technische Universität Dresden

C++ for Scientists - Technische Universität Dresden

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

240 CHAPTER 10. PROGRAMMING TOOLS<br />

0 1<br />

0.25 0.968713<br />

0.75 0.740851<br />

1.25 0.401059<br />

1.75 0.0953422<br />

2.25 -0.110732<br />

2.75 -0.215106<br />

3.25 -0.237847<br />

3.75 -0.205626<br />

4.25 -0.145718<br />

4.75 -0.0807886<br />

5.25 -0.0256738<br />

5.75 0.0127226<br />

6.25 0.0335624<br />

6.75 0.0397399<br />

7.25 0.0358296<br />

7.75 0.0265507<br />

8.25 0.0158041<br />

8.75 0.00623965<br />

9.25 -0.000763948<br />

9.75 -0.00486465<br />

plot "results" w l plot "results"<br />

The first column represents the x coordinate and the second colum contains the corresponding<br />

y coordinate values. We can plot this using the command:<br />

plot "results" w l<br />

The command<br />

plot "results"<br />

only plots stars, no line. The command help is also useful. For 3D plots, i.e. a table with three<br />

columns, we use the command splot.<br />

10.5 Unix and Linux<br />

Unix (and Linux) are not used as often as Windows plat<strong>for</strong>ms, although <strong>for</strong> scientific programming<br />

they are popular development plat<strong>for</strong>ms. The Unix operating system is a command line<br />

system with several graphical interfaces. Especially in Linux, the graphical interfaces are well<br />

developed so that you get a windows like look and feel. Although you can easily browse through<br />

the directories, create new directories and move data around with a few mouse clicks, it may<br />

be interesting to know at least a few Unix commands:<br />

• ps: list of my processes,<br />

• kill -9 id : kill the process with id id,

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!