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

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 : minor_r.c */ /* ------------------------------------ */ #include "v_a.h" /* ------------------------------------ */ void fun(int r) { int minor_r = rp_I(r); int minor_c = rp_I(r); double **A = r_mR( i_mR(r, r ),999.); double **Minor = minor_mR(A, i_mR(r-C1,r-C1), minor_r, minor_c); clrscrn(); printf(" A:"); p_mR(A, S5,P0,C6); printf(" Minor(R%d,C%d) %.4e \n\n\n", minor_r, minor_c, minor_R(A,minor_r, minor_c)); printf(" Copy/Paste into the octave window.\n\n"); p_Octave_mR(Minor,"Minor",P0); printf(" det(Minor)\n"); f_mR(A); f_mR(Minor); } /* ------------------------------------ */ int main(void) { time_t t; srand(time(&t)); do { fun(rp_I(RC5)+RC1); } while(stop_w()); return 0; } /* ------------------------------------ */ /* ------------------------------------ */ Screen output example: A : -738 +205 +822 +57 +642 -949 -961 -551 +912 -145 -843 -995 -79 -593 +444 -293 -760 -429 +633 -841 +408 -177 -799 -932 +96 +168 -447 +655 -160 -540 -685 +503 -485 +27 +853 -830 Minor(R4,C1) 1.3565e+14 Copy/Paste into the octave window. Minor=[ +205,+822,+57,+642,-949; -551,+912,-145,-843,-995; -593,+444,-293,-760,-429; +168,-447,+655,-160,-540; +503,-485,+27,+853,-830] det(Minor) Press return to continue Press X return to stop