Question: Can someone help me code this on matlab? 2. Partitioned matrices A matrix A is a (22) block matrix if it is represented in the
Can someone help me code this on matlab?


2. Partitioned matrices A matrix A is a (22) block matrix if it is represented in the form A=[A1A3A2A4] where each of the Ai are matrices. Note that the matrix A need not be a square matrix; for instance, A might be (712) with A1 being (35),A2 being (37),A3 being (45), and A4 being (47). We can imagine creating a (22) block matrix by dividing the array into four pieces using a horizontal line and a vertical line. Now suppose B is also a (22) block matrix given by B=[B1B3B2B4] Finally, let us suppose that the product AB can be formed and that B has been partitioned in a way such that the following matrix is defined: [A1B1+A2B3A3B1+A4B3A1B2+A2B4A3B2+A4B4]. It turns out that the product AB is given by this block matrix. That is, if all the submatrix products are defined, then we can treat the blocks in a partitioned matrix as though they were scalars when forming products. It is tedious to prove this result in general, so we ask you to illustrate its validity with some randomly chosen matrices. a) Using the MATLAB command round (10rand(6,6)) generate two randomly selected (66) matrices A and B. Compute the product AB. Then write each of A and B as a block matrix of the form A=[A1A3A2A4]B=[B1B3B2B4] Above, each Ai and Bi should be a (33) block. Using matrix surgery (see Section 4 of Appendix A) extract the Ai and Bi matrices and form the new block matrix: [A1B1+A2B3A3B1+A4B3A1B2+A2B4A3B2+A4B4]. Compare the preceding block matrix with AB and confirm that they are equal. Repeat this calculation on three other matrices (not necessarily (66) matrices). Break some of these matrices into blocks of unequal sizes. You need to make sure that corresponding blocks are the correct size so that matrix multiplication is defined. c) Repeat the calculation in (a) with the product of a (23) block matrix times a (33) block matrix
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
