Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
Write a fortran program. Put comment for each step One way of evaluating the determinant of a matrix, due to Laplace, re-expresses the determinant in
Write a fortran program. Put comment for each step One way of evaluating the determinant of a matrix, due to Laplace, re-expresses the determinant in terms of its minors. E.g. for a 3 x 3 matrix A, a11 a12 a13 22 123 a32 as3 421 d23 a31 a33 +a13 | a21 22 d3i a32 det(A)=| a21 a22 231=11 a12 a31 a32 a33 The minors can themselves be expanded into their minors, util only trivial 1 x 1 determinants det (a)a are requi Write a Fortran subroutine det. 95 which uses this method to calculate the determinant of an n n matrix, using recursive calls to the same subroutine to calculate the minors. For this to work, det must be declared as recursive. This is simply done by adding this keyword to the subroutine declaration line So the declaration line would be, e.g. recursive subroutine det(A,n,nmar,d) (where A is an input mnar-by-nmaz array, containing an n n matrix, and d is the output determinant). Write a Fortran progran determinant,05 that creates the 4 4 matrix 9 10 11 12 13 14 15 16 . and calls the subroutine det to evaluate det (A). This value should be written to the screen, intelligibly labelled Submit a listing of the file determinant.f95 (which should contain the subroutine det), including a note of the value output. One way of evaluating the determinant of a matrix, due to Laplace, re-expresses the determinant in terms of its minors. E.g. for a 3 x 3 matrix A, a11 a12 a13 22 123 a32 as3 421 d23 a31 a33 +a13 | a21 22 d3i a32 det(A)=| a21 a22 231=11 a12 a31 a32 a33 The minors can themselves be expanded into their minors, util only trivial 1 x 1 determinants det (a)a are requi Write a Fortran subroutine det. 95 which uses this method to calculate the determinant of an n n matrix, using recursive calls to the same subroutine to calculate the minors. For this to work, det must be declared as recursive. This is simply done by adding this keyword to the subroutine declaration line So the declaration line would be, e.g. recursive subroutine det(A,n,nmar,d) (where A is an input mnar-by-nmaz array, containing an n n matrix, and d is the output determinant). Write a Fortran progran determinant,05 that creates the 4 4 matrix 9 10 11 12 13 14 15 16 . and calls the subroutine det to evaluate det (A). This value should be written to the screen, intelligibly labelled Submit a listing of the file determinant.f95 (which should contain the subroutine det), including a note of the value output
Write a fortran program. Put comment for each step
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started