Linear Algebra and the C Language/a0h4


Install and compile this file in your working directory.

/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int rc)
{
double **U   = r_mR(i_mR(R1,rc),9);
double **V   = r_mR(i_mR(rc,C1),9);	
double **A   =      i_mR(rc,rc);

  clrscrn();
  
  rHankel_mR(U,V,A);
  
  printf(" A: Hankel matrix");
  p_mR(A, S4,P0,C10);

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

  srand(time(&t));
  
  do
        fun(RC4);

  while(stop_w());       

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


Screen output example:

                                                                                       
 A: Hankel matrix
  +5   -8   -2   -3 
  -8   -2   -3   +8 
  -2   -3   +8   +8 
  -3   +8   +8   +6 


 Press   return to continue
 Press X return to stop