Warning
This page is located in archive.

Matlab in Optimization labs

During seminars you will be using the system Matlab, which brings together resources for computation, visualization, debugging and programming of numerical problems. It is a widespread system for scientific calculations technicians. It is used on more than 3,500 universities and in hundreds of large companies.

How to get it

Matlab is not free. However, the student can install a free home multilicense of CVUT Matlab with the Master password. Matlab requires CVUT IP (147.32.x.x).

Attention: Multilicense of FEL do not include optimization toolbox, from which you will need to some exercise function linprog.

In a pinch you can use freely available truncated variant called Matlab Octave.

How to learn it

Matlab as programming language is not difficult and you learn it quickly. After installation, start (in Czech) a course that teaches basic commands. Then we suggest you print out and read this at home tutorial (Although old, but still compliant). It is useful to know, how to write Matlab code. The rest you will learn to use and frequent jotting documentation command 'help'. Enthusiastic students appreciate further example. book by numerical calculations in Matlab.

Matlab is an integrated environment: command window, graphics editor and debugger. Although it is tempting to frequent job mouse and the right way to work is to do as much as possible from the command lines. From that we enter commands advertise variables, launching created code. One of the few exceptions is the debugger, which is convenient operate a mouse.

The code you typically will not go “to the first engagement”. Although the programming language is syntactically simple meaning commands can be complicated, thanks to the use of matrix notation. Matlab allows very dense Companies thus have a single line of program can do a lot. Therefore, it is necessary to debug code bit by bit. Each piece (if possible each line) must be carefully tested: dump to vectors and matrices before and after his execution and check whether they meet.All mathematical relationships which have to meet.

We meet often with the fact that students do not know how to program either using Matlab or another language. Such students may be useful hints about (in Czech) writing and debugging (even if they are primarily designed for different subject).

Other optimization toolboxes

In addition to the optimization toolbox sold by Mathworks, there are many other optimization toolboxes in Matlab. An example is Mosek Optimization Software. Mosek it is not freeware, but there is option where you can download it download here and get Free Academic License. To install on your operating system (Linux / MacOS / Windows), you can use Instruction.

courses/ae4b33opt/labs/matlab.txt · Last modified: 2015/11/10 22:22 by duriciva