Linear Algebra and the C Language/a0h5
Install and compile this file in your working directory.
/* ------------------------------------ */
/* Save as : c00b.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
#define RC RC4
/* ------------------------------------ */
int main(void)
{
/* Hankel Matrix
V
1
2
3
U 4 5 6 7
*/
double v[RC*C1]={ 1,
2,
3,
4};
double u[R1*RC]={ 4,5,6,7};
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(" A: Hankel matrix");
p_mR(A, S4,P0,C10);
stop();
f_mR(U);
f_mR(V);
f_mR(A);
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Screen output example:
A: Hankel matrix
+1 +2 +3 +4
+2 +3 +4 +5
+3 +4 +5 +6
+4 +5 +6 +7
Press return to continue.