Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
15 views

MATLAB Tutorial

Uploaded by

Jonathan Huang
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

MATLAB Tutorial

Uploaded by

Jonathan Huang
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

MATLAB Tutorial

1. Click “New” to add new script


2. Save it as any location you prefer
Basic Operator
Matrix Representation

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

You might also like