Professional Documents
Culture Documents
MATLAB Introduction: Basics - Exercise Sheet: Data Processing Marcel Kaminski
MATLAB Introduction: Basics - Exercise Sheet: Data Processing Marcel Kaminski
Marcel Kaminski
MATLAB Introduction:
Basics - Exercise Sheet
Exercise 0
Open up the script editor → "New Script", you are now inside the editor environment.
You can save as many commands as you want as an m-file inside this environment.
Provide the m-file with an appropriate file header, a file header should look like the one
you see in figure 0.1.
Figure 0.1. First hit the "New Script" Button then insert/type a header
Then save this m-file in any directory, and afterward solve the following exercises inside
this file. Each solution shall be displayed via the "disp" command.
Exercise 1
2 2 −4
d⃗ = ⃗a + ⃗b − ⃗c,
⃗e = 2⃗a + 4(⃗b − 3⃗c),
This document is used exclusively for teaching at HAW Hamburg and must not be
2
used for other purposes or passed on to third parties. M. Kaminski, 2022
d⃗ = ⃗a + ⃗b − ⃗c.
Exercise 2
3 −3 3
Exercise 3
3 4 −6 9
Exercise 4
Define the following matrices and assign them with the appropriate variables:
1 0 0 0
3 + 4i 4 + 3j 9
0 1 0 0 T
A = −i 10j 8 , Eye = 0 0 1 0 , C = A
3 1.001 911
0 0 0 1
This document is used exclusively for teaching at HAW Hamburg and must not be
3
used for other purposes or passed on to third parties. M. Kaminski, 2022
Exercise 5 (optional)
−1 −2
This document is used exclusively for teaching at HAW Hamburg and must not be
4
used for other purposes or passed on to third parties. M. Kaminski, 2022