A generate a random 3x5 matrix with entry integers


The goals of this project are: (1) to be able to input by hand and use MATLAB functions to generate vectors and matrices in MATLAB; (2) to use MATLAB to generate a reduced echelon form for a matrix; (3) to solve a system using the reduced echelon form of its augmented matrix; (4) to investigate the linear dependence of a set of vectors.

PROBLEM 1: a) Generate A a 5x4 matrix based on five historical dates you consider important. (Input this by hand; for example, if Time Travelling Terp was planning to use the birthdate of Gabriel Cramer of Cramer's rule fame, 31 July 1704, its matrix A will have a row or column containing the numbers 31, 07 ,17, 04.

b) Using MATLAB functions, generate B, a 5x4 matrix of ones,O a 5x4 matrix of zeroes and I, the 4x4 identity matrix.  Hint: To generate B, O, and I, search for help on the functions zeroes, ones, eye.

PROBLEM 2: Based on the matrices in problem 1, compute the following elements and then explain what they are in the corresponding matrix:

(a) a= A(2,4) ; (i.e. this is the        element/row/column of the matrix A)

(b) ac= A(:,4);

(c) ar= A(2,:).

Is it true or false that (d) a*B=B*a and (e) ac*I=I*ac? (here * stands for multiplication; if a side of an equality cannot be computed, the equality is false).

Explain your results for Problem 2 points (d) and (e ).

PROBLEM 3: (a) Generate a random 3x5 matrix ?? with entry integers uniformly between -100 and 100. Hint: Search for help on the functions rand and randi. (b) Put the matrix ?? in reduced echelon form using the command rref. (c) Are the columns of A linearly independent? Why or why not? (d) What is the span of the columns of A? Base your answer on your result at points 3b and your general knowledge of what the Span of 1, 2, 3, 4 linearly independent vectors should be.

PROBLEM 4: Water is flowing through a network of pipes (in thousands of cubic meters per hour) as shown in the figure below.

1129_pipes.png

(a) Set-up in MATLAB a matrix equation whose solution determines the water flow represented by

x??, ?? = 1, 2, ? , 7. Hint: to determine what system you are trying to solve, please remember that 'Volume in=Volume out", so for example the equation corresponding to the leftmost, top node is: 600 = x1 + x3;

(b) State what the rows and columns in the matrix represent;

(c) Based on the number of the equations and the number of unknowns, do you expect that the equation at point (a) has no solutions, exactly one solution or an infinity of solutions?

(d) Solve the equation and discuss your answer;

(e) Find the water flow (a vector containing values for all x??, ?? = 1, 2, ? , 7) when x5 = 1000 and x6 = 0.

PROBLEM 5: a) Using commands such as figure, ezplot and hold graph the lines representing each equation in the system

-3x - y = 3

6x + 2y = 1;

b) Use the graph to determine whether the system is consistent or inconsistent;

c) If the system is consistent, approximate from the graph the solution;

d) Solve the system algebraically, using MATLAB to help you, and compare your algebraic result with the approximation in part c);

e) Repeat problem 5 parts a-d for the system

2x - 8y = 3

0.5x + y = 0.

Solution Preview :

Prepared by a verified Expert
Simulation in MATLAB: A generate a random 3x5 matrix with entry integers
Reference No:- TGS01284771

Now Priced at $25 (50% Discount)

Recommended (99%)

Rated (4.3/5)