1. Arrays and Vectors Exercise In the MATLAB command window enter the
1. Arrays and Vectors Exercise
In the MATLAB command window enter the E array, extract all the columns from E in
different column vectors named EC_1, EC_2, and EC_3. Manually run the
requested operations, also submit a screenshot of your work in MATLAB.
a) EC_1 + EC_2
b) -3*EC_1 + 2*EC_3
c) 0*EC_3
2. Matrix Sorting Exercise
In the command window, use the appropriate MATLAB functions to:
a) Obtain a higher triangular matrix ETS from the matrix E of exercise 1.
b) Then obtain a lower triangular matrix ETI from E; and
c) Finally, use the MATLAB diag() function to extract the elements from the
main diagonal of E in a column vector called DE. For this you must execute
In the command window the statement:
>> help diag
For assistance with such instruction. You will need to run the diag() statement with two
arguments: X and K. Find out that they are X and K to get the correct result.
3. Operations with matrices
Let A and B matrices of (3 x 2), find a matrix G such that A + B + G results in a
matrix of (3 x 2) with all its elements equal to 1.
4. Properties of Operations with Arrays
If a matrix product AB results in a column vector, which of the following
statements is correct with respect to matrices A and B?
a) A is a row vector
b) Matrix B is a column matrix or column vector
c) A and B are necessarily square
d) The number of columns in A is different from the number of rows in B
Demonstrate your answer with a numerical example. You can use MATLAB for this purpose.
