Question

Exercice 2. Let A given by -(iii) 21 A 1 -2 01 -2 1. Compate det( A) and ine.A) in MATLAB 2Use MATLAB to cheek boy coanpating
0 0
Add a comment Improve this question Transcribed image text
Answer #1

clc;
close all;
clear all;
A=[-2 1 0;1 -2 1;0 1 -2];
%%%%%%%%%%%%%%question 1%%%%%%%%%%%%%
fprintf('determinant of A=%f\n',det(A));
fprintf('inverse of A=\n');
%%%%%%%%%%%%%%question 2%%%%%%%%%%%%%
fprintf('inverse of A inverse\n');
A=inv(A)
fprintf('original A\n')
A=inv(A)
%%%%%%%%%%%%%%question 3%%%%%%%%%%%%%
fprintf('random matrix A\n');
A=round(40*(rand(5)-0.5))
fprintf('random matrix B\n');
B=round(40*(rand(5)-0.5))
det(A)
det(B)
det(3*A)
3*det(A)
3^3*det(A)
det(A')
det(B')
det(A+B)
det(A)+det(B)
det(A*B)
det(B*A)
det(A'*B')
det(B'*A')
det(inv(A))
1/det(A)
det(inv(A)*B)
det(A)/det(B)
det(B)/det(A)
det(inv(B)*A*B)
det(inv(B)*B)
det(2*inv(B)*B)

just copy this code and paste into a new script and run

you will get all values of table mention aboveA I-2 1 0:1-2 1:0 1 -2] 몽몽몽몽몽몽몽몽몽몽몽몽용용ques tion 1몽몽몽몽몽몽몽몽몽몽몽몽용 fprintf ( determinant of A=%f\n, det (A) ) ; fprintf (inversdeterminant of A4.000000 inver3e of A= nverse of A inverse -0.75000.5000 0.2500 -0.5000 1.0000 0.5000 -0.2500 0.5000 -0.7500random matrix B 12 10 12 -16 2 3 -16 -9 -16 7 -416 20 -13 2 13 -9 -12 ns -1.8313e+06 ans - 2243520 -4.4500e+08 -5.4938e+06 an serially on command window of matlab.

Add a comment
Know the answer?
Add Answer to:
Exercice 2. Let A given by -(iii) 21 A 1 -2 01 -2 1. Compate det(...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT