# EL2310 Scientific Programming 7.5 credits

## Programmeringsteknik

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 program in C/C++.

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

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 proceeded by an optional lab that provides an

additional opportunity to train before the project.

The theme for the projects are mainly 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.

#### Education cycle

Second cycle#### Main field of study

Electrical Engineering

#### Grading scale

P, F

At present this course is not scheduled to be offered.

## Intended learning outcomes

The goal of the course is to provide the participants with a basic

knowledge in programming in general and specifically in

MATLAB, C and C++.

After completing the course, the participants should:

- be able to demonstrate and discuss basic concepts in programming such as loops, recursion, memory access and object oriented programming.
- be able to read in, process and display data in MATLAB
- solve problems and implement algorithms in MATLAB
- be skilled enough in the use of MATLAB to understand programs written in MATLAB and to independently learn about more advanced features of MATLAB.
- be able to read in and process data in programs written in C and C++
- be able to solve problems and implement algorithms in C and C++
- be able to describe what simple programs written in C or C++ do, i.e., be able to read and understand existing code in those programming languages.
- be able to document their code and have an understanding of the importance of writing code that others can understand also.
- be able to change code, correct errors and build upon existing code in MATLAB, C and C++.

## Course main content

The course focuses on providing the participants with the tools that are needed to work in research and development in an environment where computers are becoming increasingly more important. To instruct computers, programming is needed.

The following will be covered in the course:

- Basic general concepts in programming such as variables, functions, objects, classes, etc.
- Basic programming, input/output of data, processing of data and visualisation in MATLAB
- Basic programming, input/output of data and processing in C/C++ and basic concepts in object oriented programming.

## Disposition

The exact lecture distribution will be updated along the course, but a rough outline is :

- Introduction: course outline, motivating examples, [L1]
- MATLAB using it as a tool and programming [L2-L5]
- Programming in C [L6-L12]
- Programming in C++ [L13-L16]

## Eligibility

For single course students: 120 credits and documented proficiency in English B or equivalent.

## Recommended prerequisites

None required, but without any programming experience at all the student will need to work very hard.

## Literature

Det finns ingen kursbok. Föreläsningsanteckningar distribueras online

För de studenter som trots allt önskar en bok rekommenderas

- MATLAB

F. Gustafsson och N. Bergman, Matlab for Engineers Explained, Springer Verlag, 2003 (ISBN 1-85233-697-8) - C

Kernighan and Ritchie, The C programming language, 2nd edition, Prentice Hall (ISBN 0-13-110362-8) - C++

Stroustrup, The C++ programming language, Addison Wesley

There is no dedicated course book. Lecture notes will be distributed

online. For those who would like a book, the following are recommended:

- MATLAB

F. Gustafsson och N. Bergman, Matlab for Engineers Explained, Springer Verlag, 2003 (ISBN 1-85233-697-8) - C

Kernighan and Ritchie, The C programming language, 2nd edition, Prentice Hall (ISBN 0-13-110362-8) - C++

Stroustrup, The C++ programming language, Addison Wesley

## Examination

- LAB1 - Programming in MATLAB, 2.5, grading scale: P, F
- LAB2 - Programming in C, 2.5, grading scale: P, F
- LAB3 - Object Oriented Programming, 2.5, grading scale: P, F

## Requirements for final grade

To pass the course, the students need to successfully complete

each of the three projects incl homework assignments: MATLAB, C and C++.

## Offered by

EECS/Intelligent Systems

## Contact

Ramviyas Nattanmai Parasuraman <ramviyas@kth.se>

## Examiner

Patric Jensfelt <patric@kth.se>

## Supplementary information

The course is mainly a so-called transition course and should not be

read by students who already read:

DD2310 Javaprogrammering för Pythonprogrammerare

DD2385 Programutvecklingsteknik

DD2387 Programsystemkonstr. m. C++

DD1320 Tillämpad datalogi

DD1321 Tillämpad programmering och datalogi

DD1322 Tillämpad programmering och datalogi, del 1

DD1324 Tillämpad programmering och datalogi, del 2

DD1332 Objektorienterad programmering

DD1343 Datalogi och numeriska metoder, del 1

DD1345 Grundläggande programmering och datalogi

DD1346 Objektorienterad programkonstruktion

## Add-on studies

There is a large number of programming courses at KTH.

## Version

Course syllabus valid from: Autumn 2015.

Examination information valid from: Spring 2019.