home *** CD-ROM | disk | FTP | other *** search
- /* General form test program for scientific functions */
-
- /* Routine Tested: STCRMT */
-
- main()
-
- {
- int *fp,i,j,k,lcc,lcd,lcv,m,n;
- float v[2][4],c[2][2];
- static float d[5][2]={ 2., 1.,
- 5., 3.,
- 7., 1.,
- -4.,-2.,
- 2., 3.};
- lcc = 2;
- lcd = 2;
- lcv = 4;
- n = 2;
- m = 5;
-
- stcrmt(lcd,lcv,lcc,n,m,d,v,c);
-
- *fp=fopen("PRN:","w"); /* open the printer */
-
- fprintf(*fp,"Test Results from STCRMT\n");
- printf("Test Results from STCRMT\n\n");
-
- fprintf(*fp," Variable Mean Variance Std Dev\n");
- printf( " Variable Mean Variance Std Dev\n");
-
- for(i = 0 ; i <= 1; i++)
- {
- for(j = 0; j <= 3 ; j++)
- {
- fprintf(*fp,"%11.6f",v[i][j]);
- printf( "%11.6f",v[i][j]);
- }
- fprintf(*fp,"\n");
- printf("\n");
- }
-
- fprintf(*fp,"\n Correlation Matrix\n");
- printf( "\n Correlation Matrix\n");
-
- for(i = 0 ; i <= 1; i++)
- {
- for(j = 0; j <= 1 ; j++)
- {
- fprintf(*fp,"%11.6f",c[i][j]);
- printf( "%11.6f",c[i][j]);
- }
- fprintf(*fp,"\n");
- printf("\n");
-
- }
- }
-