First Matlab has to be installed. As already mentioned the software is commercial, but luckily in many universities for example for students free. In this case Matlab can be installed from these sources. After a successfull installation and registration the program can be started, one should see roughly this picture:

In the middle window, the Command Window, we now can directly enter commands and this way execute code. Here one can grasp the simplicity of the scripting language Matlab quickly: Variables for example do not have to be defined, there are no types, numbers, matrices etc. can just be used.

Let us enter

*A = 1*and confirm with Enter, after that

*B = 2*and confirm too. In the Matlab environment now

*A*and

*B*are saved as the corresponding numbers, which we then can use, for example via

*A + B*.

Just like that we can also define matrices (and thus vectors): Values in one row are separated by a comma, rows with semicolon, the whole matrix is cornered by brackets.

*C = [1, 2; 3, 4]*defines the corresponding matrix, after pressing Enter we then also see this graphically in the output window.

With these numbers and matrices we can now operate as we are used to, try for example

*B * C + C*to execute a scalar multiplication followed by matrix addition.

This should suffice for a first introduction, soon other posts will follow.

## No comments:

## Post a Comment