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

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 = rsymmetric_mR( i_mR(r,r),99); double **EValue = eigs_mR(A, i_mR(r,C1)); clrscrn(); printf(" Let's calculate the eigenvalues" "​​ of a symmetric matrix.\n" " The eigenvalues ​​are positive and negative.\n\n" " A :"); p_mR(A,S5,P0,C6); printf(" EValue :"); p_mR(EValue,S13,P4,C1); f_mR(A); f_mR(EValue); } /* ------------------------------------ */ int main(void) { time_t t; srand(time(&t)); do { fun(rp_I(R3)+R2); } while(stop_w()); return 0; } /* ------------------------------------ */ /* ------------------------------------ */ Screen output example: Let's calculate the eigenvalues​​ of a symmetric matrix. The eigenvalues ​​are positive and negative. A : -20 +28 -2 +28 +49 +95 -2 +95 +40 EValue : +141.8404 -61.4747 -11.3657 Press return to continue Press X return to stop