Christine, your assignment is [here].
[14/5] Klara, you only need to login to the examination server at the official reexamination date (12-13/06, I think) and upload, say, the archive of your exam folder.
[14/5] Christine, remember to supply the link to your repository at the Wiki above. Remember also to login to the examination server at the official reexamination date (12-13/6, I think) and upload, say, the archive of your homeworks so that the server registers you as participated in the exam. Then, on 27/6 you should come to this page and get the examination assignment.
The examination assignments for the 22/3 run will be available [here] on 22/3 at 10:00.
The examination assignments for the 16/3 run, (Magnus H. Geismar, Peter Granum Nielsen, Magnus Graf Skou, Laura Feuerhake) will be available [here] on 16/3 at 10:00.
Makefile.txt
.
report.pdf
file (built from
report.tex
, article style or your other favourite
style)—one or two pages—with i) a short formulation of the
problem at hand; ii) the way you solved it; iii) and an illustration
indicating that you solved the problem correctly.
You must submit this pdf file to the examination server at the official examination date.
exam
) inside your folder for the Practical
Programming.
make
.
make clean
must clean the folder and leave
only the files from which the project is built.
out.txt
, or efuns.png
)—which
must prove the exercise is done satisfactorily. If in doubt consult your
fellow student.
~/pprog/hello
, using the make
utility.
ssh
to your account.
man
utility. Run man man
and read the DESCRIPTION of the utility
in your system. Hints: man
usually uses less
as the default pager; you quit from less
by pressing the
q
-key.
cp
,
ls
,
mkdir
,
mv
,
rm
,
and the bash built-in command cd
. Hint: type, for example, man
1 mkdir
in your terminal or into Google-search in your browser.
sudo apt-get install nano
.
sudo apt-get install build-essential
.
man
by pressing q
.
~ | home directory |
.. | parent directory |
. | current working directory |
$HOME | home directory |
cd -
changes into the previous directory.
char
, int
, float
,
double
, long double
, complex
;
Operators +
,-
,*
,/
;
Simple output with the
printf
function; C math functions, math library (remember
-lm
); type-generic math tgmath.h
.
↑
and ↓
keys scroll over the previously issued commands.
!text
runs the latest command that
begins with text
. Useful for issuing the same command again.
if
, switch
and loops while
, for
,
do-while
; Scope of variables: file, function, block.
switch
is not so important).
sudo apt-get install manpages-posix manpages-posix-dev
make
utility.
From now on all your exercises (and also the examination project) must be managed using makefiles.
.RECIPEPREFIX := ;
.
~/.nanorc
,
syntax "makefile" "[Mm]akefile" color white,magenta " "where the character in between the quotation marks in the second line should be the tabulator sign and where the colors are free for you to choose.
man stdout
man atoi
(ascii to integer)
and man atof
(ascii
to double).
man scanf
Makefile
to Makefile.txt
and run your
make as make -f Makefile.txt
.
brew install gnuplotOn Debian based systems, like Ubuntu, the command is
sudo apt-get --yes install gnuplotand/or
sudo apt-get --yes install pyxplot gvActually it seems there appeared a new gnuplot version 5, so if you want the latest, do
sudo apt-get --yes install gnuplot5The
--yes
option automatically answers 'yes' on all questions
apt-get
might ask.
Some of you might have managed to install a special version of gnuplot,
called gnuplot-nox
where 'nox' means 'no X-window'. This
version, predictably, has no x-window terminal. If you plan to use
gnuplot interactively, you have to install 'gnuplot', not 'gnuplot-nox'.
The two plotting utilities have very similar scripting languages but otherwise are somewhat different. Pyxplot uses LaTeX to render all text on the plot which is rather convenient. Gnuplot has more terminals. Look at their web-pages, gnuplot and pyxplot (specifically, the examples), and choose the one you like most (or both).
Note: it seems the developement of pyxplot has stagnated at the moment, therefore gnuplot might indeed be a better option.
apt-cache search libgsl | grep developmentIt should return either
libgsl0-dev
or
libgls-dev
, depending on your system. Install this package,
sudo apt-get install libgsl0-devor
sudo apt-get install libgsl-devThe HomeBrew users should (apparently) use the command
brew install gsl
Alternatively, you can download the source code and build the library on your box. It will probably take more time though.
gsl_odeiv2_system
with
the fields function, jacobian, dimension,
params
to hold an Ordinary Differential Equations
Initial Value System.
gsl_odeiv2_step_rk2
,
gsl_odeiv2_step_rk4
,
gsl_odeiv2_step_rk45
, ... ,
gsl_odeiv2_step_bsimp
. Note which of the algorithms require the
Jacobian of the system.
gsl_odeiv2_driver_alloc_y_new
and
gsl_odeiv2_driver_apply
sudo apt-get install texlive texlive-latex-extra
brew cask install mactexor
brew cask install basictex # allegedly a small but functional version of MacTeX
gsl_integration_qag
(adaptive Gauss-Kronrod integrator)
gsl_integration_qags
(singular integrand)
gsl_integration_qagi
(infinite interval)
gsl_integration_qagiu
(infinite upper interval)
gsl_integration_qagil
(infinite lower interval)
gsl_integration_cquad
(new fashionable algorithm)
gsl_multimin_function
gsl_multimin_fminimizer
gsl_multimin_fminimizer_nmsimplex2
gsl_multimin_fminimizer_alloc|free
gsl_multimin_fminimizer_set
gsl_multimin_fminimizer_iterate
gsl_multimin_fminimizer_size
gsl_multimin_fminimizer_test_size
gsl_multiroot_function
gsl_multiroot_fsolver_alloc|free
gsl_multiroot_fsolver_set
gsl_multiroot_fsolver_iterate
gsl_multiroot_test_residual
#include<assert.h>
and use assertions plentifully:
you can easily disable all assertions by simply
recompiling the code with -DNDEBUG
c-flag:
CFLAGS += -DNDEBUG