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

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" /* ------------------------------------ */ void fun(void) { double **U_T = r_mR(i_mR(R1, C3), 9); double **V_T = r_mR(i_mR(R1, C3), 9); double **W_T = r_mR(i_mR(R1, C3), 9); double **UxV = UxV_mR(U_T,V_T, i_mR(R1,C3)); double **UxW = UxV_mR(U_T,W_T, i_mR(R1,C3)); double **UxV_pls_UxW = add_mR(UxV,UxW, i_mR(R1,C3)); double **VplusW = add_mR(V_T,W_T, i_mR(R1,C3)); double **Ux_VplusW = UxV_mR(U_T,VplusW, i_mR(R1,C3)); clrscrn(); printf(" u_T:"); p_mR(U_T, S4,P0,C6); printf(" v_T:"); p_mR(V_T, S4,P0,C6); printf(" w_T:"); p_mR(W_T, S4,P0,C6); printf("\n\n\n"); printf(" u x (v+w):"); p_mR(Ux_VplusW, S5,P0,C6); printf(" (uxv) + (uxw):"); p_mR(UxV_pls_UxW, S5,P0,C6); f_mR(U_T); f_mR(V_T); f_mR(W_T); f_mR(UxV); f_mR(UxW); f_mR(UxV_pls_UxW); f_mR(VplusW); f_mR(Ux_VplusW); } /* ------------------------------------ */ int main(void) { time_t t; srand(time(&t)); do { fun(); } while(stop_w()); return 0; } /* ------------------------------------ */ /* ------------------------------------ */ u x (v+w) == (uxv) + (uxw):. Screen output example: u_T : -2 +7 +8 v_T : -5 +6 -5 w_T : -6 +1 -9 u x (v+w) : -154 -116 +63 (uxv) + (uxw) : -154 -116 +63 Press return to continue Press X return to stop