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

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 : dline.h */ /* ------------------------------------ */ double ** m_line_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]= 1.; /* x^0*y^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"); } /* --------------------------------- */ void verify_eq_line_mR( double **A, double x, double y ) { double p = cofactor_R(A,R1,C1)*(x) + cofactor_R(A,R1,C2)*(y) + cofactor_R(A,R1,C3); printf(" With x=%+5.1f y=%+5.1f eq=%+5.5f\n",x,y,p); } /* ------------------------------------ */ /* ------------------------------------ */