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

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