Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

FORTRAN code getting one submatrix and oscillating determinant

$
0
0
I am new to FORTRAN (programming generally) and am having problems with my code, which I have been trying to fix for weeks without success.

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)
: 2
 data.txt (239bytes)
: 1

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>