#include #include /* Simplified example program for F01QDF/E */ main() { int i,ifail,j,m = 5,n = 3,ncolb = 2; int lda = m,ldb = m; FTCHAR ftnstring1, ftnstring2; /* Initialise arrays in column major order */ static double a[3][5] = { 2.0, 2.0, 1.6, 2.0, 1.2, 2.5, 2.5, -0.4, -0.5, -0.3, 2.5, 2.5, 2.8, 0.5, -2.9 }; static double b[2][5] = { 1.1, 0.9, 0.6, 0.0, -0.8, 0.0, 0.0, 1.32, 1.1, -0.26 }; double work[2],zeta[3]; printf("F01QDF/E Example Program Results\n\n"); ifail = 0; F01QCE(&m,&n,(double *)a,&lda,zeta,&ifail); ifail = 0; ftnstring1.s = "Transpose"; ftnstring1.len = 9; ftnstring2.s = "Separate"; ftnstring2.len = 8; F01QDE(ftnstring1,ftnstring2,&m,&n,(double *)a,&lda,zeta,&ncolb, (double *)b,&ldb,work,&ifail); printf("Matrix Q'*B\n"); for (i=0; i < m; i++) { for (j=0; j < ncolb; j++) { printf("%f ",b[j][i]); } printf("\n"); } }