This is a part of my code. I am wondering why it says "Error in line 15 m = max(d, u,1)"? Thanks!
%Inputs:
% n = size
% A is a n x n matrix
% a = how much matrix A is wanted to be shifted
% kounttol is the number of iterations
% d is the first number needed to form matrix T
% u is the second number needed to form matrix T
% tol is the the tolerance for the residual, i.e. your iteration
% should stop once the number of iteration is smaller than kounttol
% e is the vector of eigenvalues of matrix A
% m is the number of iterations k actually done
function lam=shiftedqr(n ,a, kounttol, d, u)
tol = 0.1e-08;
m = max(d, u, 1);
T = (d*eye(n) + uN)/m;
A = T + T';
e = eig (A);