EL2310 Scientific Programming (7.5 ECTS)
Scientific Programming is a programming course tailored for the Systems, Control and Robotics program. The aim is to ensure that everyone can use MATLAB which will be used in many of the coming courses as well as to be able to program in C/C++.
The examination of this course is through projects that should be solved
individually. There is one project for MATLAB, one for C and one for
C++. Each project is preceded by an optional lab that provides an
additional opportunity to train before the project.
The themes for the projects are mainly from robotics. Over the past years, algorithms
and methods such as path planning with potential fields and
probabilistic road maps, scan matching and the control of robot
manipulator arms have been investigated.
Solving the projects requires not only the ability to program, but to
analyse a problem and to go from a mathematical formulation to an
algorithm and then to an implementation. Finally, and just as
importantly, an evaluation should also be carried out to make
sure that the implementation works as expected.
A full description for this course can be found in the
KTH Course Catalogue.
Feedback
The course has been developed and improved over several years by several people, including
Patric Jensfelt, Carl Henrik Ek, Kai Huebner, Andrzej Pronobis, Florian T. Pokorny. Please provide feedback and let me
know how we can further improve this course!
Links
- Please check the EL2310 page on Bilda to discuss questions about the course and to submit your projects.
-
Matlab
Matlab Documentation,
StackOverflow Matlab
"Matlab for Engineers Explained", F. Gustafsson och N. Bergman, Springer Verlag, 2003 (ISBN 1-85233-697-8)
-
C
Programming in C Video Course,
C Programming WikiBook,
Pointers and arrays in C,
Coding Conventions,
C/C++ Reference,
C/C++ Library Reference,
StackOverflow C
"C Programming Language (2nd Edition)", Brian W. Kernighan, Dennis M. Ritchie, Prentice Hall, 1988
-
C++
Programming in C++,
C++ WikiBook,
Google C++ Style Guide,
Another C++ Style Guide ,
StackOverflow C++
-
Linux and programming tools
Introduction to Linux,
Vi/Vim file editor,
Emacs file editor,
Makefile Tutorial
Virtual Machine
In order to provide an identical environment for all students working on
the C and C++ projects, an Ubuntu virtual machine was prepared in
VirtualBox. The VM has all the required tools preinstalled
(gcc/g++/emacs/SDL etc.) and will be used to run the submitted project
code for grading. You can download a RAR compressed VirtualBox VM here.
To use the virtual machine, download and install VirtualBox.
Then, download and unpack the virtual machine and add it to VirtualBox
using Machine->Add. To exchange files between the virtual machine
(guest operating system) and your OS (host OS), use shared folders. More information about VirtualBox can be found here.
Lectures
Details about labs, downloadable slides etc will be posted here as we proceed.
Please check this website for updates to the schedule.
Note that this course largely relies on your self-study and that the slides are mainly there to provide you with a frame of reference.
-
-
Wed 02.09.2015
Help session for the Matlab project is on Wed 9/9 at 13:00 at 304 (22:an), Teknikringen 14.
-
Mon 07.09.2015
Lecture 3: Scripts and Functions,
slides.
Student presentation 1 on PCA,
code.
-
Thu 10.09.2015
Lecture 4: Programming in Matlab,
slides.
Presentation 2 on kmeans,
code.
-
Mon 14.09.2015
Lecture 5: Programming in Matlab,
slides.
Presentation 3 on how to speedup Matlab code,
examples.
Lecture 6: Introduction to C,
slides.
Presentation 4 on regression and classification with Matlab,
slides.
-
Thu 17.09.2015
Lecture 7: Basics of C,
slides.
Presentation 5 on image processing with Matlab,
slides.
-
Mon 21.09.2015
Presentation 6 on sorting algorithms,
slides.
-
Thu 24.09.2015
Presentation 7 on breadth first search and depth first search,
slides,
code.
Help session for the C project is on Friday, Oct 2, at 08:00 at 304 (22:an), Teknikringen 14.
-
Mon 28.09.2015
-
Wed 30.09.2015
Lecture 12: Wrap Up C.
The second help session for the C project is on Wed Oct 7 at 13:00 at 304 (22:an), Teknikringen 14.
The help session for the C++ project is on Fri Oct 16 at 13:00 at 304 (22:an), Teknikringen 14.
The deadline for the C++ project is Mon Oct 26, 20:00.
The C++ project description will be available on Fri Oct 9.
-
Mon 5.10.2015
Lecture 13: Introduction to C++,
slides.
-
Thu 8.10.2015
Presentation 10 on MEX files.
-
Mon 12.10.2015
Presentation 11 on Genetic Algorithms:
slides.
-
Wed 14.10.2015
Lecture 16: STL and C++11,
slides.
-
Thu 15.10.2015
Lecture 17: Conclusion,
slides.
Presentation 12 on optimization of C code:
slides.
Presentation 13 on Huffman coding.
Presentation 14 on Expectation-Maximization (EM) algorithm and Monte Carlo sampling,
slides .
Presentation 15 on multithreading,
slides.