Write a code in matlab to compute the determinant of a matrix by iteration. DO N
ID: 2259768 • Letter: W
Question
Write a code in matlab to compute the determinant of a matrix by iteration. DO NOT USE THE DETERMINANT FUNCTION OF MATLAB.
Explanation / Answer
matlab code:
A = [1 2 3;
4 5 6;
8 10 99];
[L, U, P] = lu(A)
prod = 1;
for i=1:size(A)
prod*= L(i,i)*U(i,i);
end
disp(prod);
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.