Linear Algebra and the C Language/a082
Install and compile this file in your working directory.
/* ------------------------------------ */
/* Save as: c00d.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
#define RA R3
#define CA C3
#define Cb C1
/* ------------------------------------ */
int main(void)
{
double ab[RA*(CA+Cb)]={
-804, -884, +529, +30,
-783, +367, +583, -826,
-804, -884, +529, +30
};
double **Ab = ca_A_mR(ab, i_Abr_Ac_bc_mR(RA,CA,Cb));
clrscrn();
printf(" Copy/Paste into the octave window.\n\n");
p_Octave_mR(Ab,"Ab",P0);
printf("\n rref(Ab,.00000000001)\n\n");
printf(" gj_PP_mR(Ab,YES) The system is consistent");
p_mR(gj_PP_mR(Ab,YES), S10,P4,C7);
is_system_consistent_mR(Ab);
stop();
f_mR(Ab);
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Screen output example:
Copy/Paste into the octave window.
Ab=[
-804,-884,+529,+30;
-783,+367,+583,-826;
-804,-884,+529,+30]
rref(Ab,.00000000001)
gj_PP_mR(Ab,YES) The system is consistent
+1.0000 +0.0000 -0.7187 +0.7285
+0.0000 +1.0000 +0.0552 -0.6965
+0.0000 +0.0000 +0.0000 +0.0000
Press return to continue.