I am trying to write a code to calculate the determinant of any "n" dimensional matrix using the laplace expansion formula.
PROBLEM:
My code only calculates the first submatrix i.e for A(1,1) and does not continue the loop for all the A(1,j) i.e elements of the 1st row only.
Furthermore, the value of the determinant calculated keeps oscillating because i was thinking it should give a definite value even if it is wrong.
Below is my code. I have also attached the "data.txt" file.
Thanks.
laplace.txt (1.63K)
Number of downloads: 18
data.txt (239bytes)
Number of downloads: 12

New Topic/Question
Reply



MultiQuote


|