home *** CD-ROM | disk | FTP | other *** search
- /* General form test program for scientific functions */
-
- /* Routine Tested: MATEIG */
-
- main()
-
- {
- int lra,n;
- static float a[3][3]={ 1., 1.,.5,
- 1., 1.,.25,
- .5,.25, 2.
- };
- float s[3][3];
-
- lra = 3;
- n = 3;
-
- mateig(lra,n,a,s); /* call the function */
- printr(a,n,n); /* print the result */
- printr(s,n,n);
-
- }
-
- /* Routine to print matrices */
-
- printr(a,nrow,ncol)
-
- int nrow,ncol;
- float a[];
-
- {
- int *fp,j,k,ne;
-
- ne = ncol-1;
-
- *fp=fopen("PRN:","w"); /* open the printer */
-
- fprintf(*fp,"Test Results from MATEIG\n\n");
- printf("Test Results from MATEIG\n\n");
-
- for(j = 0; j <= nrow-1 ; j++)
- {
- for(k = j*ncol; k <= j*ncol+ne ; k++)
- {
- fprintf(*fp,"%18.9f ",a[k]);
- printf("%18.9f ",a[k]);
- };
- fprintf(*fp,"\n");
- printf("\n");
- }
- fprintf(*fp,"\n\n");
- printf("\n\n");
-
- }
-