Denna www-sida har författats av Erik Brodin, Patrik Albin och Sofia Tapani - Ansvarsförhållanden (This webpage has been written by Erik Brodin, Patrik Albin and Sofia Tapani - Disclaimer)
(Later updated by Vera Lisovskaja)



General programming

A first tip on programing. Do not invent the wheel again. Always try to find a function which are doing what you want. Use help documentation or just search at google.

When writing a program one should always remember that is common that other people will use it. Hence one has to write clear and structured. To do this, follow this example: Programming example


Matlab

For a short tutorial, just type "Matlab tutorial" in google and pick one!


R

For a short tutorial, just type "R tutorial" in google and pick one!

An introduction to R can be found here. It is quite long so do not print it!
The homepage of R can be found here.
R demo script from the introduction on R that Tobias was giving.
A reference card for R can be found here.

Book: Crawlew "The R book".


C

For a short tutorial, just type "C tutorial" in google and pick one!

An introduction to C can be found here or another one here

        Here are two example programs (from the document programming_tips.pdf, which can also be found below on this page): startup1.c and startup2.c.
        Compile with the Linux command gcc -o app1 startup1.c -lm. Here gcc is the command that invokes the C compiler, -o is a flag that indicates the we want to have the compiled program in the file app1. Further, -lm is a flag that have to be included when we use the math.h library. The program is then executed with the UNIX command ./app1.

       Powerpoint-presentation from the introduction on C that Tobias was giving 2016.

    C interface in Matlab

It is possible to integrate C/C++ code in Matlab through an interface called "mex". Here is a short HOWTO on how it can be done. Observe that it also includes a simple C program that makes use of the gsl library (e. g. for random number generation).


Document with programming tips

Here is a document with some tips on all the above packages.


Linux navigation

Here are some very basic Linux commands used to navigate the system.