Linear Algebra and the C Language/a0ek


Install and compile this file in your working directory.

/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
int main(void)
{
 double **A     =    i_mR(R3,C5);
 
   clrscrn();
   printf("       Math : A[%d][%d]:",rsize_R(A),csize_R(A));
   p_mR(A, S4,P0,C7);

   printf(" The pall_mR(); function shows the internal\n"
          " structure of the matrix.\n\n");   	
   printf(" C language : A[%d][%d]:\n",rsize_R(A),csize_R(A));
   pall_mR(A, S4,P0,C7);
   
   printf(" The columns have an index.\n\n"
          " On the left you have the size of the matrix.\n"
          " Four rows with the row zero and\n"
          " six columns with the column zero.\n\n"); 
             
   stop();

   f_mR(A);
  
   return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */


Screen output example:

                                                                                       
        Math : A[3][5]:
  +0   +0   +0   +0   +0 
  +0   +0   +0   +0   +0 
  +0   +0   +0   +0   +0 

 The pall_mR(); function shows the internal
 structure of the matrix.

 C language : A[3][5]:
+4        +1   +2   +3   +4   +5 

+6        +0   +0   +0   +0   +0 
+0        +0   +0   +0   +0   +0 
+0        +0   +0   +0   +0   +0 

 The columns have an index.

 On the left you have the size of the matrix.
 Four rows with the row zero and
 six columns with the column zero.

 Press return to continue.