/* nag_kalman_sqrt_filt_info_var(g13ecc) Example Program * * Copyright 1993 Numerical Algorithms Group * * Mark 3, 1993 */ #include #include #include #include #define NMAX 20 #define MMAX 20 #define PMAX 20 #define TDA NMAX #define TDB MMAX #define TDC NMAX #define TDQ MMAX #define TDR PMAX #define TDT NMAX int main(void) { double ainv[NMAX][TDA]; double qinv[MMAX][TDQ]; double rinv[PMAX][TDR]; double t[NMAX][TDT]; double b[NMAX][TDB]; double c[PMAX][TDC]; Integer i, j, m, n, p; double x[NMAX], z[MMAX]; Integer istep; double rinvy[PMAX]; Nag_ab_input inp_ab; double tol; Integer nmax, mmax, pmax; Vprintf("g13ecc Example Program Results\n"); /* Skip the heading in the data file */ Vscanf("%*[^\n]"); nmax = NMAX; mmax = MMAX; pmax = PMAX; Vscanf("%ld%ld%ld%lf",&n,&m,&p,&tol); if (n<=0 || m<=0 || p<=0 || n>nmax || m>mmax || p>pmax) { Vfprintf(stderr, "One of n m or p is out of range " "n = %ld, m = %ld, p = %ld\n", n, m, p); return EXIT_FAILURE; } inp_ab = Nag_ab_prod; /* Read data */ for (i=0; i