Assignment 4
Assignment 4
Assignment 4
1. Create the following matrix by typing one command. Do not type individual
element explicitly.
0 0 0 0 0
a) 𝐶 = 0 0 5 5 5
0 0 5 5 5
0 0 0 0 0
b) 𝐹 = 0 0 1 10 20
0 0 2 8 26
0 0 3 6 32
1 2 3 4 5 6
𝐴= 7 8 9 10 11 12
13 14 15 16 17 18
Page 1 of 2
4. The following matrix is defined in MATLAB:
3 3 3 0 0 0 0
𝑁= 0.7 0.8 0.9 1.0 1.1 1.2 1.3
14 12 10 8 6 4 2
22 17 12 7 2 −3 −8
a) Create a 2 X 2 matrix F from the first and third rows, and the second through
the sixth columns of matrix N.
b) Create a 2 X 7 matrix G from third and fourth rows and all the columns of
matrix N.
5. Using the zeros, ones and eye commands, create the following arrays:
1 1 0 0 1
1 0 0 1 1 0 0 0
a) b) 1 1
0 1 0 1 1 1 1 0 0 0
1 1 0 0 0
6. Create a 2 X 2 matric A in which all the elements are 1. Then reassign A to itself
(several time) such that A will become:
1 1 0 0 1 1 0 0
𝐴= 1 1 0 0 1 1 0 0
0 0 1 1 0 0 1 1
0 0 1 1 0 0 1 1
4𝑥 − 2.5𝑦 + 3𝑧 = 22.2
6𝑥 − 4𝑦 − 2𝑧 = 16.6
2𝑥 + 4𝑦 − 5.5𝑧 = −11.3
Page 2 of 2