Linear Algebra and the C Language/a05k
Install and compile this file in your working directory.
/* ------------------------------------ */
/* Save as : det_R.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = r_mR(i_mR(r,r),99);
clrscrn();
printf(" Copy/Paste into the octave window.\n\n");
p_Octave_mR(A,"A", P0);
printf(" det(A)\n\n\n");
printf(" det_R(A) = %+.0f\n\n\n",det_R(A));
f_mR(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(RC5)+RC1);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Screen output example:
Copy/Paste into the octave window.
A=[
+35,-40,-7;
+24,-57,+6;
+39,+33,+99]
det(A)
det_R(A) = -139860
Press return to continue
Press X return to stop