a)
MATLAB CODE
A11 = eye(2,2)
A12 = [1 2 3;4 5 -1]
A22 = eye(3,3)
A21 = zeros(3,2)
OUTPUT
b)
MATLAB CODE
A = [A11 A12;A21 A22]
size(A)
OUTPUT
c)
MATLAB CODE
LHS=pinv(A)
OUTPUT
d)
MATLAB CODE
a = pinv(A11)
d = pinv(A22)
b = -a*A12*d
RHS = [a b;A21 d]
OUTPUT
e)
MATLAB CODE
if isequal(int64(LHS),RHS)
disp 'Success'
end
OUTPUT
Use MATLAB to write your codes Consider a matrix A with block matrices as follows: A...
Bonus: Implement the following algorithm in MATLAB and submit your solution as an m-file. Input: two n x n matrices A, B, where n = 2k for some k = 0,1,2,... Output: the product C = AB. . For k = 0, both A and B consist of only one number, and C is the product of these numbers. . For k > 0, split A, B into 4 blocks of size 2-1 x 2-1 as in A = (Au:...
in matlab 6. Create a big matrix with submatrices: The following matrix G is created by inserting the matrices A, B, and C from Exercise 3, together with zero matrices and 2 x 2 identity AY NOT llr SIIAIut. UMOADIT, SOLD Og1 DISTIunUTII》 THIS CONTENT IS PROTECTED AND M 019 2 CopprightQ Schoall of Mathercatical and Statistical Sceom Ariaona State Cniseesity matrices in the appropriate position. Create the matrix using submatrioes A, B, C, zeros and eye (that is, you...
Exercise 1: Write MATLAB code to create a 5x5 matrix A with 2's on the diagonal, and -1 on the super- and sub-diagonal. Then replace the (1,1) element of A with a 1. (Make your commands capable of handling an arbitary sized NxN matrix by first defining N=5, then using the variable N as the size in each of the commands.)
1. Write a MATLAB function that takes a matrix, a row number and a scalar as arguments and multiplies each element of the row of the matrix by the scalar returning the updated matrix. 2. Write a MATLAB function that takes a matrix, two row numbers and a scalar as arguments and returns a matrix with a linear combination of the rows. For example, if the rows passed to the function were i and j and the scalar was m,...
Matlab answer only Form 1 6) [10 pts] Consider the following two matrices B=[S A 3 1 5 -7 4 6-3] a) Obtain the sum of each row of matrix A. b) Use the size function to create a magic matrix P which has the same size as matrix A. c) Create a matrix called Q from the second column of matrix A d) Extract the four numbers in the lower left-hand corner of matrix A and create matrix R....
In the next exercises, we consider square n X n matrices; I is the identity matrix (In MATLAB eye (n) gives a square n by n matrix). If ex is the column unit vector which components are all O's except the kth component which is equal to 1, i.e., 이".e1 = 101 0 then the identity matrix I is such that: 10 000 ei = [100 01T, , el 1000 11T. 0 0 T' 0 0 1 To generate in...
linear algebra Let V (71, 72, 3}, where 71 73=(2,0,3). (1,3,-1), 2 = (0, 1,4), and (a) Prove: V is a basis. (b) Find the coordinates of (b, b2, bs) with respect to V = {71, U2, 3,}. (c) Suppose M and M' are matrices whose columns span the same vector space V. Let b be the coordinates of relative to M. Write a matrix equation that gives b', the coordinates of relative to M'. (Your answer should be a...
I need to Write a Matlab program to use Hebb rule with pseudo-inverse matrix to Distinguish between the numbers from 0 to 9 written as follow 1. Consider the following patterns. 1) Write a Matlab program to reproduce the results using the Hebb rules. Try different input patterns in the network to test its capability. Explain your results. 2) Ropoai 1) using ho pudoinverse ule. How do the rosulis diffr from those of 1)? 1. Consider the following patterns. 1)...
please provide the matlab working screenshot 4. Consider the matrix 1 1 0 -1 0 -1 1 3 12 1 1 (a) Use Matlab to determine the reduced row echelon form of A. (b) If v, v2, vs, v4 are the column vectors of the matrix A, use your result from (a) to obtain a basis for the subspace of W-lin[vi, V2, vs, v4. Write the basis in the box below. 4. Consider the matrix 1 1 0 -1 0...
Write a c++ program: Many mathematical problems require the addition, subtraction, and multiplication of two matrices. Write an ADT Matrix. You may use the following class definition: const int MAX_ROWS = 10; const int MAX_COLS = 10; class MatrixType { public: MatrixType(); void MakeEmpty(); void SetSize(int rowsSize, int colSize); void StoreItem(int item, int row, int col); void Add(MatrixType otherOperand, MatrixType& result); void Sub(MatrixType otherOperand, MatrixType& result); void Mult(MatrixType otherOperand, MatrixType& result); void Print(ofstream& outfile); bool AddSubCompatible(MatrixType otherOperand); bool MultCompatible(MatrixType otherOperand);...