Linear Algebra and the C Language/a0ey


Install and compile this file in your working directory.

/* ------------------------------------ */
/*  Save as :   c00b.c                  */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A   = rE_mR(i_mR(r,r), 99999, 1E-2);

  clrscrn();

  printf(" Scientific notation.\n\n"
         " Copy/Paste into the octave window.\n\n");
         
  pE_Octave_mR(A,"A",P4);
  printf("format short e\n" 
         "inv(A)\n");

  f_mR(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));
do
{
  fun(rp_I(RC5)+C1);

} while(stop_w());


  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */

Screen output example:

                                                                                       
 Scientific notation.

 Copy/Paste into the octave window.

 A=[
-5.7881e+02,-1.8561e+02,-2.2646e+02;
-8.8150e+01,+7.6354e+02,+8.7700e+01;
-2.2897e+02,+2.6200e+00,+9.9481e+02]

format short e
inv(A)

 Press   return to continue
 Press X return to stop