Introduction to Wireless Communication (EE 4365)
MATLAB Homework 2
Due: Tuesday 9/07/2022 (11:59 PM)
• This homework is a continuation of vector and matrix operations in MATLAB.
• The names of the functions you’ll need to look up are provided in bold where
needed.
• Your submission will include the MATLAB code followed by its corresponding
outputs in a .txt file (or a MATLAB script file).
Problem 1: Vector Normalization
(a) Create a vector x = ei2t/3 , where t = [1, 2, ..., 10]. Find the norm of vector x,
which can be denoted as |x| (DO NOT use norm).
(b) Magnitude normalization: Normalize the vector x such that |x| = 1 (use norm).
(c) Zero-mean normalization: Normalize the vector x such that it has a mean of 0
(use mean).
(d) Minmax normalization: Normalize the vector t so all of its values are between
0 and 1 (use min and max).
(e) Normalize the vector x such that it has a mean of -5 (use mean).
Problem 2: Matrix Inverse and determinant
1 1 1
(a) Create a square matrix A = 2 2 2 and find |A|.
3 3 3
(b) Is the matrix A invertible? If not, why?
1 0 0
(c) Create a square matrix B = 1 1 0 and find |B|.
0 1 1
(d) Is the matrix B invertible? If yes, find B−1 .
1
2
Problem 3: Vector Extraction
1 1 0
(a) Create a square matrix A = 0 1 1. Extract the columns of matrix A as
1 0 1
column vectors c1 , c2 , c3 and the rows as row vectors r1 , r2 , r3 . (c1 is the first
column of A, r1 is the first row of A and so on)
T
c3
T T T T
(b) Create a matrix B = c2 (The rows of matrix B are c3 , c2 , c1 ).
cT
1
T T T
(c) Create a matrix C = r3 r1 r2 (The columns of matrix C are rT T T
3 , r1 , r2 ).
a21 a22 a11 a12
(d) Extract the matrices D = and E = from the matrix A.
a31 a32 a31 a32
Here, aij is the ijth element (row = i, column = j) of matrix A.