#include
#include
#define N 4 /* data array size */
#define N1 5
#define N2 4
int main() {
int i,j;
array double xy[N2][N2];
array double x[N][N1]={{1,2,3,4,5},
{1,2,3,4,5},
{0,0,0,0,1},
{2,3,4,5,6}};
covariance(xy,x); /* covariance of matrix */
printf("x=%8.3f\n",x);
printf("xy=%8.3f\n",xy);
}
x= 1.000 2.000 3.000 4.000 5.000
1.000 2.000 3.000 4.000 5.000
0.000 0.000 0.000 0.000 1.000
2.000 3.000 4.000 5.000 6.000
xy= 2.500 2.500 0.500 2.500
2.500 2.500 0.500 2.500
0.500 0.500 0.200 0.500
2.500 2.500 0.500 2.500