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

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 : c04a.c */ /* ------------------------------------ */ #include "v_a.h" /* ------------------------------------ */ #define RCA R4 /* ------------------------------------ */ int main(void) { double a[RCA*RCA]={ +9.825339522090, +7.309094034726, -3.954100051573, -1.198212136840, +7.309094034726, +5.437252879491, -2.941464672512, -0.891352931064, -3.954100051573, -2.941464672512, +1.591284167096, +0.482207323363, -1.198212136840, -0.891352931064, +0.482207323363, +0.146123431322 }; double **A = ca_A_mR(a,i_mR(RCA,RCA)); clrscrn(); printf(" Copy/Paste into the octave windows \n\n"); p_Octave_mR(A,"a",P12); printf(" [V, E] = eigs (a,%d) \n\n",RCA); stop(); f_mR(A); return 0; } /* ------------------------------------ */ /* ------------------------------------ */ Screen output example: Copy/Paste into the octave windows a=[ +9.825339522090,+7.309094034726,-3.954100051573,-1.198212136840; +7.309094034726,+5.437252879491,-2.941464672512,-0.891352931064; -3.954100051573,-2.941464672512,+1.591284167096,+0.482207323363; -1.198212136840,-0.891352931064,+0.482207323363,+0.146123431322] [V, E] = eigs (a,4) Press return to continue.