Create problem2m and use appropriate MATLAB function if appl

Create problem2.m and use appropriate MATLAB function (if applicable) to solve: A= [2 0 1 1 -1 2 3 1 1] and B = [2 -1 4 0 -1 3 3 -2 1] Verify that det (AB) = det (A) det(B). Verify that det (A^-1) = 1/det(A). Verify that (AB)^-1 =B^-1 A^-1. Report A(:, 2:3) and C=A(:, 1) Report B(1:2, 2:3) and D=B(:, 3) Report \"setdiff (C, D)\" explain what this function does. You can use MATLAB help by entering \"help setdiff\" in the command window. Use the following command: A(2, 1:3)=B(3, 1:3), then report new A matrix

Solution

A=[2,0,1;1,-1,2;3,1,1];
B=[2,-1,4;0,-1,3;3,-2,1];
test1=det(A*B)-det(A)*det(B);% if test is zero both are equal
test2=det(inv(A))-(1/det(A));% if test is zero both are equal
test3=inv(A*B)-inv(B)*inv(A);% if test is zero both are equal
A(:,2:3);%columns 2 and 3
C=A(:,1);%first column
B(1:2,2:3); % two rows of columns2 and 3
D=B(:,3) %third column
setdiff(C,D) % help setdiff%
A(2,1:3)=B(3,1:3)

 Create problem2.m and use appropriate MATLAB function (if applicable) to solve: A= [2 0 1 1 -1 2 3 1 1] and B = [2 -1 4 0 -1 3 3 -2 1] Verify that det (AB) = d

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site