MATLAB Tutorial
MATLAB Tutorial
Noticed
A(## , ##)
Column Row
(run vertical) (run horizontal)
Exercise 1 – Create Matrix
Exercise 2 – Matrix Multiplication
(1 ∗ 3) + (3 ∗ 1) (1 ∗ 0) + (3 ∗ 5)
(2 ∗ 3) + (4 ∗ 1) (2 ∗ 0) + (4 ∗ 5)
1∗3 3∗0
2∗1 5∗4
Exercise 3 – Solve Linear Equations
𝑦1 = 2𝑥1 + 4𝑥2 = 16
𝑦2 = 1𝑥1 + 4𝑥2 = 14
2 4
𝑦1 =
1 4
16
𝑦2 =
14
2
x_value= ⇒ 𝑥1 = 2 , 𝑥2 = 3
3
Exercise 4 – Plot equations
𝜋 𝜋
Eq1: 𝑦= cos(2𝑥) − 2 , 𝑥 ∈ [− 2 , 2 ]
𝑥2 𝑦
Eq2: f x, y = 3
− 5 , (−2 ≤ 𝑥 ≤ 2, −4 ≤ 𝑦 ≤ 4)
Reference
• https://www.tutorialspoint.com/matlab/index.htm