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

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. thumb| /* ------------------------------------ */ /* Save as : c00b.c */ /* ------------------------------------ */ #include "v_a.h" /* ------------------------------------ */ #define RA R8 #define CA C8 #define Cb C1 /* ------------------------------------ */ int main(void) { double ab[RA*(CA+Cb)]={ // I1 I2 I3 I4 I5 I6 +1, -1, -1, +0, +0, +0, 0, 0, 0, +0, +0, +1, -1, -1, +0, 0, 0, 0, +0, +1, +0, +0, +1, -1, 0, 0, 0, -1, +0, +0, +1, +0, +1, 0, 0, 0, +0, -50, +0, +0, +0, -20, 0, 0, -90, +0, +50, -20, +0, -10, +0, 0, 0, 0, +0, +0, +0, -50, +10, +20, 0, 0, 0, +0, +0, -20, -50, +0, +0, 0, 0, -90, }; double **Ab = ca_A_mR(ab,i_Abr_Ac_bc_mR(RA,CA,Cb)); double **A = c_Ab_A_mR(Ab,i_mR(RA,CA)); double **b = c_Ab_b_mR(Ab,i_mR(RA,Cb)); clrscrn(); printf(" Ab :\n" " I1 I2 I3 I4 I5 I6 "); p_mR(Ab,S6,P2,C9); stop(); clrscrn(); printf(" Copy/Paste into the octave window.\n\n"); p_Octave_mR(Ab,"Ab",P0); printf("\n rref(Ab,.00000000001)\n\n"); stop(); clrscrn(); printf(" gj_TP_mR(Ab) :\n\n" " I1 I2 I3 I4 I5 I6 "); p_mR(gj_TP_mR(Ab),S6,P2,C9); stop(); f_mR(Ab); f_mR(b); f_mR(A); return 0; } /* ------------------------------------ */ /* ------------------------------------ */ thumb| Screen output example: Ab : I1 I2 I3 I4 I5 I6 +1.00 -1.00 -1.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +1.00 -1.00 -1.00 +0.00 +0.00 +0.00 +0.00 +0.00 +1.00 +0.00 +0.00 +1.00 -1.00 +0.00 +0.00 +0.00 -1.00 +0.00 +0.00 +1.00 +0.00 +1.00 +0.00 +0.00 +0.00 +0.00 -50.00 +0.00 +0.00 +0.00 -20.00 +0.00 +0.00 -90.00 +0.00 +50.00 -20.00 +0.00 -10.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 -50.00 +10.00 +20.00 +0.00 +0.00 +0.00 +0.00 +0.00 -20.00 -50.00 +0.00 +0.00 +0.00 +0.00 -90.00 Press return to continue. Copy/Paste into the octave window. Ab=[ +1,-1,-1,+0,+0,+0,+0,+0,+0; +0,+0,+1,-1,-1,+0,+0,+0,+0; +0,+1,+0,+0,+1,-1,+0,+0,+0; -1,+0,+0,+1,+0,+1,+0,+0,+0; +0,-50,+0,+0,+0,-20,+0,+0,-90; +0,+50,-20,+0,-10,+0,+0,+0,+0; +0,+0,+0,-50,+10,+20,+0,+0,+0; +0,+0,-20,-50,+0,+0,+0,+0,-90] rref(Ab,.00000000001) Press return to continue. gj_TP_mR(Ab) : I1 I2 I3 I4 I5 I6 +1.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +3.00 +0.00 +1.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +1.00 +0.00 +0.00 +1.00 +0.00 +0.00 +0.00 +0.00 +0.00 +2.00 +0.00 +0.00 +0.00 +1.00 +0.00 +0.00 +0.00 +0.00 +1.00 +0.00 +0.00 +0.00 +0.00 +1.00 +0.00 +0.00 +0.00 +1.00 +0.00 +0.00 +0.00 +0.00 +0.00 +1.00 +0.00 +0.00 +2.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00 Press return to continue.