Solve the following problems in MATLAB Given A 3 2 1 6 85 7
Solve the following problems in MATLAB. Given A = [3 -2 1 6 8-5 7 9 10]; B = [6 9 -4 7 5 3 -8 2 1]; C= [-7 -5 2 10 6 1 3 -9 8]; Find the following A+B+C Verify the associative law (A-B)+C=A+ (B-C) D=Transpose(AB) E=A^4 + B^2 - C^3 Find F, given that F = E^-1 * D^-1 - (A^T)^-1
Solution
Below is the MATLAB code for the question ...
% Define the matrices A , B and C
A=[3 -2 1
6 8 -5
7 9 10];
B=[ 6 9 -4
7 5 3
-8 2 1];
C=[-7 -5 2
10 6 1
3 -9 8];
% A+B+C is diplayed
disp (\"A+B+C is \")
A+B+C
%verify associative law (A+B)+C=A+(B+C)
disp(\"Verify associative law\")
lhs=(A+B)+C
rhs=A+(B+C)
%D is transponse of A*B
disp(\"transpose(AB)\")
D=transpose(A*B)
%E=A^4+B^2-C^3
disp(\"E=A^4+B^2-C^3\")
E=A^4+B^2-C^3
%F=E^-1*D^-1-(At)^-1
% A\' is anohter way of finding transpose of A
F=inv(E)*inv(D)-inv(A\')
![Solve the following problems in MATLAB. Given A = [3 -2 1 6 8-5 7 9 10]; B = [6 9 -4 7 5 3 -8 2 1]; C= [-7 -5 2 10 6 1 3 -9 8]; Find the following A+B+C Verify Solve the following problems in MATLAB. Given A = [3 -2 1 6 8-5 7 9 10]; B = [6 9 -4 7 5 3 -8 2 1]; C= [-7 -5 2 10 6 1 3 -9 8]; Find the following A+B+C Verify](/WebImages/15/solve-the-following-problems-in-matlab-given-a-3-2-1-6-85-7-1022175-1761528829-0.webp)