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

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

__NOTOC__ Install and compile this file in your working directory. /* ------------------------------------ */ /* Save as : c00a.c */ /* ------------------------------------ */ #include "v_a.h" /* ------------------------------------ */ /* ------------------------------------ */ double **X_rHankel_mR( double **U, double **V, double **A ) { int cn = C2; int r = rsize_R(A)-R1; int c = C1; isquare_mR(A,"rHankel_mR;","(A)"); c_c_mR(V,C1,A,C1); c_r_mR(U,R1,A,rsize_R(A)); for(cn = C2; r >= R1; cn++,r--) c_rU_rA_cn_mR(U,R1,A,r,cn); c_c_r_mR(V,C1,U,R1); for(c=C1, r=R1; r < rsize_R(A)-C1; r++, c++) c_Uc_r_mR(U,c,A,r); return(A); } /* ------------------------------------ */ /* ------------------------------------ */ void fun(int rc) { double **U = r_mR(i_mR(R1,rc),9); double **V = r_mR(i_mR(rc,C1),9); double **A = i_mR(rc,rc); clrscrn(); rHankel_mR(U,V,A); printf(" A: Hankel matrix"); p_mR(A, S4,P0,C10); f_mR(U); f_mR(V); f_mR(A); } /* ------------------------------------ */ int main(void) { time_t t; srand(time(&t)); do fun(RC4); while(stop_w()); return 0; } /* ------------------------------------ */ /* ------------------------------------ */ Screen output example: A: Hankel matrix +9 +7 +5 +8 +7 +5 +8 +5 +5 +8 +5 -3 +8 +5 -3 +1 Press return to continue Press X return to stop