Linear Algebra and the C Language/a0hb


Install and compile this file in your working directory.

/* ------------------------------------ */
/*  Save as :   c00h.c                  */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
#define   RC  RC6
/* ------------------------------------ */
int main(void)
{
/* Hankel Matrix, anti-circulant matrix 
   
        V
 
        a 
        b 
        c 
        d
        e
        f 
                   
   U    f a b c d e
     
  */
double v[RC*C1]={ 1,
	              2,
	              3,
	              4,
	              5,
	              6};
	              	
double u[R1*RC]={ 6,1,2,3,4,5};
                  
double **V   = ca_A_mR(v,i_mR(RC,C1));	
double **U   = ca_A_mR(u,i_mR(R1,RC));
double **A   =           i_mR(RC,RC);

  clrscrn();
  
  rHankel_mR(U,V,A);


  printf(" We sometimes speak of an anticirculating\n"
         " or left circulating matrix when we shift\n"
         " the coefficients to the left when moving\n"
         " from one row to the next.           \n\n\n");  
  printf(" A: Anticirculating matrix");
  p_mR(A, S4,P0,C10);
  
  stop();

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


Screen output example:

                                                                                       
 We sometimes speak of an anticirculating
 or left circulating matrix when we shift
 the coefficients to the left when moving
 from one row to the next.           


 A: Anticirculating matrix
  +1   +2   +3   +4   +5   +6 
  +2   +3   +4   +5   +6   +1 
  +3   +4   +5   +6   +1   +2 
  +4   +5   +6   +1   +2   +3 
  +5   +6   +1   +2   +3   +4 
  +6   +1   +2   +3   +4   +5 

 Press return to continue.