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

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

__NOTOC__ Install this file in your working directory. /* ------------------------------------ */ /* Save as : dplan.h */ /* ------------------------------------ */ void verify_eq_plan_mR( double **A, double x, double y, double z ) { double p = cofactor_R(A,R1,C1)*(x) + cofactor_R(A,R1,C2)*(y) + cofactor_R(A,R1,C3)*(z) + cofactor_R(A,R1,C4); printf(" With x=%+.0f y=%+.0f z=%+.0f eq=%+.5f\n", x,y,z,p); } /* ------------------------------------ */ double ** m_plan_A_mR( double **At, double **A ) { int ra; int r; int c; for(c=C1;c<A[C_SIZE][C0];c++)A[R1][c]=1.; /* First line */ for(r=R2,ra=R1; r<A[R_SIZE][C0]; r++,ra++) { c=C1; A[r][c]= At[ra][C1]; /* x^1 */ c++; A[r][c]= At[ra][C2]; /* y^1 */ c++; A[r][c]= At[ra][C3]; /* z^1 */ c++; A[r][c]= 1.; /* x^0*y^0*z^0 */ } return(A); } /* ------------------------------------ */ void p_Det_mR( double **A, int e, int d ) { int r; int c; for(r=R2;r<A[R_SIZE][C0];r++) { printf("\n"); for (c=C1;c<A[C_SIZE][C0];c++) printf("%+*.*f",e,d,A[r][c]); } printf("\n\n"); } /* ------------------------------------ */ /* ------------------------------------ */