## Description

Control System Homework 1

1. Basic Arithmetic

Please calculate the following equation and store to variable z1

z1 =

1

2

ln (? + √1 + ?

2) + ?

x = [

2 1 + 2?

−0.45 5

]

I : identity matrix.

2. Matrix/Vector

We know that

A = [

12 34 −4

34 7 87

3 65 7

]

B = [

1 4 7

2 5 8

3 6 9

]

Find

(a) z2 = A*B,

(b) z3 = A.*B

(c) z4 = A^3,

(d) z5 = A.^3

(e) z6 = [A([1,3],:);B^2]

(f) z7 = a vector contains eigenvalues of B

(g) z8 = determinant of A

3. Equation Solving

[

1/2 1/3 1/4

1/3 1/4 1/5

1/4 1/5 1/6

][

?1

?2

?3

] = [

0.95

0.67

0.52

]

Solve x1, x2, x3. Then change 0.52 to 0.53 and solve again.

4. Loop statement

Please create a 9*9 Hilbert matrix

Reference: https://en.wikipedia.org/wiki/Hilbert_matrix

5. Plot

Please plot the following equation in one figure, with eq1 on the left and eq2 on

the right.

Eq1:

?1 = − √cos(?) + 3, ??[−

?

2

,

?

2

]

Eq2:

f(x, y) =

?

2

2

2 −

?

2

4

2

, (−2 ≤ ? ≤ 2, −4 ≤ ? ≤ 4)