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

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 : dpara.h */ /* ------------------------------------ */ void verify_eq_parabola_mR( double **A, double x, double y ) { double p = cofactor_R(A,R1,C1)*y + cofactor_R(A,R1,C2)*pow(x,2) + cofactor_R(A,R1,C3)*x + cofactor_R(A,R1,C4); printf(" With x=%+5.1f y=%+5.1f eq=%+5.5f\n",x,y,p); } /* ------------------------------------ */ double ** m_parabola_A_mR( double **Ap, 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]= Ap[ra][C2]; /* y^1 */ c++; A[r][c]= pow(Ap[ra][C1],2); /* x^2 */ c++; A[r][c]= Ap[ra][C1]; /* x^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"); } /* ------------------------------------ */ /* ------------------------------------ */