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

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 : c00d.c */ /* ------------------------------------ */ #include "v_a.h" /* ------------------------------------ */ /* ------------------------------------ */ double **X_c_c_mR( double **A, int cA, double **B, int cB ) { int r; for(r=R1; r<A[R_SIZE][C0]; r++) B[r][cB] = A[r][cA]; return(B); } /* ------------------------------------ */ /* ------------------------------------ */ void fun(int r,int c) { double **A = r_mR(i_mR(r,c),99.); double **B = i_mR(r,c); clrscrn(); printf(" A :"); p_mR(A, S5,P0,C10); printf(" B : c_c_mR(A,C1,B,C2);"); c_c_mR(A,C1,B,C2); p_mR(B, S5,P0,C10); f_mR(A); f_mR(B); } /* ------------------------------------ */ int main(void) { time_t t; srand(time(&t)); int i; do { i = rp_I(R3)+R1; fun(i,i+C1); } while(stop_w()); return 0; } /* ------------------------------------ */ /* ------------------------------------ */ Copy a column from matrix A into matrix B : Screen output example: A : -76 +52 +5 +69 -83 +41 +86 -77 -36 -41 -65 -89 B : c_c_mR(A,C1,B,C2); +0 -76 +0 +0 +0 -83 +0 +0 +0 -36 +0 +0 Press return to continue Press X return to stop