Hello, I'd like to find the determinant of a matrix without using built-in functions.
I thought of using cofactor expansion, and this is my code.
(I'm very new to this MATLAB programming, and I have very little knowledge about this part.)
I'm actually not sure if I could arrange the codes like that.
I could really use some help, please. Thank you for reading.
function det=myDet(A)if size(A)==[2 2] a_ij=A(i, j); det=(a_11)*(a_22)-(a_12)*(a_21);else i=1:n; A(:,1)=[]; A(i,:)=[]; A=A_i; det=symsum((((-1)^(i+1))*myDet(A_i)),i,1,n)endend
Best Answer