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

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(int r) { double **A = rskewsymmetric_mR( i_mR(r,r), 9); double **AT = transpose_mR(A, i_mR(r,r)); double **mns1A = smul_mR(-1,A, i_mR(r,r)); clrscrn(); printf(" Skew-symmetric matrix : -A = AT\n\n\n"); printf(" -A:"); p_mR(mns1A, S7,P3,C6); printf(" AT:"); p_mR(AT, S7,P3,C6); f_mR(A); f_mR(AT); } /* ------------------------------------ */ int main(void) { time_t t; srand(time(&t)); do { fun(rp_I(R3)+R1); } while(stop_w()); return 0; } /* ------------------------------------ */ /* ------------------------------------ */ A skew-symmetric matrix is a square matrix whose transpose equals its negative: -A = AT Screen output example: Skew-symmetric matrix : -A = AT -A: -0.000 -4.000 -2.000 -8.000 +4.000 -0.000 -9.000 -1.000 +2.000 +9.000 -0.000 -4.000 +8.000 +1.000 +4.000 -0.000 AT: +0.000 -4.000 -2.000 -8.000 +4.000 +0.000 -9.000 -1.000 +2.000 +9.000 +0.000 -4.000 +8.000 +1.000 +4.000 +0.000 Press return to continue Press X return to stop