Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Linear Algebra and the C Language/a06h

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

__NOTOC__ Inverse: Code study First, I check the determinant. Then, I calculate the adjoint. Finally, I multiply all rows of the adjoint by the inverse of the determinant in a for() loop. /* ------------------------------------ */ /* ------------------------------------ */ double **inv_mR( double **A, double **InvA ) { double det = det_R(A); double invdet = 1; int r; if(!det) { printf("\n inv_mR error - The determinant is Zero"); printf("\n Press return to continue.\n"); fflush(stdout); getchar(); exit(EXIT_FAILURE); } adjoint_mR(A,InvA); invdet /= det; for(r=R1; r<A[R_SIZE][C0]; r++) mulR_mR(InvA,invdet,r); return(InvA); } /* ------------------------------------ */ /* ------------------------------------ */