Hide menu

TSRT04 Introduction in Matlab

Håkan Johansson
Håkan Johansson

Course Director

MATLAB is a software for scientific computations that is used internationally by many engineers. The course intends to give a basic knowledge of MATLAB and practical experience of working with the software. Particular focus is put on the ability to perform basic computations and simulations, as well as visualising simulation results. The course can both be seen as a preparation to a large number of university courses where Matlab is used, and as a possibility to learn a powerful engineering software. Basic knowledge in MATLAB is very useful for engineering students, since it is expected in many courses.

This course contains:

  • Introduction to MATLAB and interactive computations.
  • MATLAB syntax and review of common built-in MATLAB functions.
  • Programming in MATLAB using m-files: scripts and functions.
  • Simple linear algebra and calculus in MATLAB.
  • Visualization of data and computational results.
  • Practicing on problem solving by dividing a project into smaller pieces that can easily be tested and validated.

Course information VT2 2021

In VT1 2021, the course will be given online. The lecture will take place in Zoom (link will be available in Lisam), whereas the lessons and labs will take place in Teams: Team_TSRT04 Introduction in Matlab, VT2 2021 (it will be available when the course has started). The course room in Lisam will be used for signing up to the lessons and labs.


The course consists of an introductory lecture, two 2-hour computer lessons, and five 2-hour lab exercises. The examination consists of presentation of the plot assignment and mini-project. The presentation of assignments can be made at Lab 3 and Lab 5.

Registration to lessons and lab exercises can be done in Lisam after the course has started.

Note that you select a lesson group and a lab group and thereby register for two lessons and five labs, the dates in Lisam indicate the first lesson and first lab (the full schedule is in TimeEdit). You can choose different lesson and lab groups.

The rest of this page contains information regarding all parts of the course. Here are links each part:


The course begins with a lecture that is given by the course director, Håkan Johansson. It is strongly recommended to attend this lecture, so that you won't miss any information around the course structure, goals, and examination process. You are also expected to read this entire webpage, so that you are aware of all materal, information, and links.

Lecture in VT2 2021:

The lecture consists of two parts. The first part presents the admininstrative course information whereas the second part provides an introduction to Matlab. It includes how to perform basic calculations, the use of scripts and functions, visualization of data, and control structures.

The scheduled lecture focuses on the first part. The complete second part is presented as a video available on Youtube and in the Lisam system, see the links below.

Lecture video, part 2:
Youtube: https://youtu.be/gUxWkfwjblo
Lisam: https://liuonline.sharepoint.com/portals/hub/_layouts/15/PointPublishing.aspx?app=video&p=c&chid=6a64f59a-f253-417f-b449-488d64b555cc


The two lessons are scheduled for the first and second week of the course. The lessons are based on self-studies where you go through the lesson material (see below). Course assistants are available to answer questions and give general advice. Please take the opportunity to ask whenever something is unclear! The goal with the lessons is to learn the MATLAB basics as a preparation for the labs.

During VT2 2021, the lessons are led by:

Lesson 1 gives an introduction to MATLAB. How to start the software and where to find more information? We use MATLAB as a pocket calculator, define and make computations with matrices, and draw graphs. How to use the built-in help functionality in MATLAB, and how to save your work and write documentation? We also write a few simple scripts and functions.

Lesson 2 contains the basics of programming. We have a close look at one of the most powerful aspects of MATLAB: to write your own functions and programs that can be used just as the built-in functions.

Lab exercises

A series of mandatory lab exercises, "computer laborations", are given from course week three to seven, one per week. You need to register for a lab series (in Lisam after the course has started). The lab exercises are led by the same people as the lessons. The examination is taken care of by PhD students and postdocs from the Division of Communication Systems.

The lab exercises consist of two parts: one assignment where MATLAB's plot functions are used to visualize data, and a somewhat larger programming assignment that we call the "mini-project". These assignments are solved individually or in groups of two students.

Lab 1: You should have learnt the basics of MATLAB in preparation for the first lab exerice, so that you are ready to begin with the problem solving. You will begin with the plot assignment and then the mini-project, with help from the course assistants.

Lab 2-5: You will continue during the remaining four labs (and outside the classroom) to finish the assignments. Please note that these assignments require a lot of homework if you are unfamiliar with programming, so you should spend time on the course each week and take the opportunity to ask the course assistents! If you are experienced in programming and finish early, then you will find some additional tasks in the project description. These require a bit more of programming skills.

Choose one plot assignments and one mini-project from the following alternatives:

The solutions should be demonstrated and the code should be presented at Lab 3 or Lab 5. You are most welcome to present the plot assignment at one occasion and the mini-project at another occasion.

Note that your code that solves the mini-project must be sent to Urkund (an anti-plagiarism system) when you have passed the project. You find the exact instructions on page 2 of the project description.


This course consists of 16 hours in lecture/class rooms and you are thus expected to spend up to 37 hours on self-studies (5-6 hour per week). If you have a computer we recommend you to install MATLAB on it, so that you can work at home. All students at Linköping University have the possibility to borrow a MATLAB license, due to a special license agreement with Mathworks. The software is available for download at the the Student portal. We are not answering questions on the license and downloading part, but kindly ask you to contact helpdesk@student.liu.se.

In the description to Lesson 1 there is a number of homework problems, which we recommend you solve during the first two course weeks, as an extra preparation for the quiz. After that, you should work on the plot assignment and the mini-project some hours each week. If get stuck while working at home, you are welcome to contact the course assistant of your group. All questions regarding course material and practicalities can be sent by e-mail.


Read this carefully! The course examination consists of the following parts:

  • Presentation of the code that solves one (1) plot assignment.
  • Solution to one (1) mini-project. The teacher will run the code for a few test cases, ask some questions, and have a look at the code. The code should solve all the problems mentioned in the project description and must be easy to read and use. This means, in particular, that it follows the examination and coding style guide below.
You need the present an ID card (e.g., LIU-id) when solving the quiz and when presenting the project. When you have passed the project you also need to submit the code that solve the mini-project to Urkund (according to the instructions in the project description).

Collection of course material

The course material consists of:

Plot assignment: Choose one of the following plot assignments to solve and present during the lab exercises:

Mini-project: Choose one of the following mini-projects to solve and present during the lab exercises:

Examination and coding style guide : Please read this document to understand what we expect from you when you present your project:


  • You need this certificate as a reference of having completed different parts of the examination. Please keep it until you have received your course credits!

Additional information

Additional recommended external material

Important links

Computer account and Linux

You will need a computer account at ISY to follow the lessons and lab exercises. You should normally get it automatically when you applied for the course. If you experience any problems related to computer account, you should contact the computer support: //www.isy.liu.se/en/tus/.

In computer rooms with Linux, you launch MATLAB by writing:
module add prog/matlab/9.0

If you want to use Windows-like shortcuts on a Linux computer, you can choose this under Preferences/Keyboard/Shortcuts in MATLAB.

Page responsible: Håkan Johansson
Last updated: 2021 03 26   10:02