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/a01i

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

/* ------------------------------------ */ /* Save as : ve_det3.h */ /* ------------------------------------ */ 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); } /* ------------------------------------ */ double **UxV_mR( double **U_T, double **V_T, double **UxV_T ) { double **A = i_mR(R3, C3); // u and v -> A c_r_mR(U_T, R1, A, R2); c_r_mR(V_T, R1, A, R3); // cofactor(detA) -> (u x v) c_s_mR(cofactor_R(A, R1, C1), UxV_T, R1, C1); c_s_mR(cofactor_R(A, R1, C2), UxV_T, R1, C2); c_s_mR(cofactor_R(A, R1, C3), UxV_T, R1, C3); f_mR(A); return(UxV_T); } /* ------------------------------------ */ /* ------------------------------------ */