/* prog3a.c -- Find the Eigenvalue of Largest Absolute Value Written Sep 28, 2002 by Eric Olson for Mathematics 483 For more information see Section 1.7 in Numerical Analysis for Applied Mathematics, Science and Engineering by Donald Greenspan and Vincenzo Casulli. */ #include #include #define N 45 double A[N][N]; double w[N],y[N]; main(){ double lambda,lambda_old; int i,j,k,n,c; puts("prog3a.c -- Find the Eigenvalue of Largest Absolute Value\n"); for(n=1;n<=N;n++){ lambda=1000.0; for(i=0;i30000){ printf("Didn't converge: "); lambda_old=lambda; } } printf("n=%d lambda=%g rho(A)=%g\n",n,lambda,fabs(lambda)); } return 0; }