Matlab programs


    cauchy   Cauchy matrix.
    chebspec Chebyshev spectral differentiation matrix.
    chebvand Vandermonde-like matrix for the Chebyshev polynomials.
    chow     Chow matrix -- a singular Toeplitz lower Hessenberg matrix.
    circul   Circulant matrix.
    clement  Clement matrix -- tridiagonal with zero diagonal entries.
    condex   Counter-examples to matrix condition number estimators.
    compar   Comparison matrices.
    cycol    Matrix whose columns repeat cyclically.
    dorr     Dorr matrix -- diagonally dominant, ill-conditioned, tridiagonal.
             (Three output arguments)
    dramadah Matrix of ones and zeroes whose inverse has large integer entries.
    fiedler  Fiedler matrix -- symmetric.
    forsythe Forsythe matrix -- a perturbed Jordan block.
    frank    Frank matrix -- ill-conditioned eigenvalues.
    gearmat  Gear matrix.
    grcar    Grcar matrix -- a Toeplitz matrix with sensitive eigenvalues.
    hanowa   Matrix whose eigenvalues lie on a vertical line in the complex
             plane.
    house    Householder matrix. (Two output arguments)
    invhess  Inverse of an upper Hessenberg matrix.
    invol    Involutory matrix.
    ipjfact  Hankel matrix with factorial elements. (Two output arguments)
    jordbloc Jordan block matrix.
    kahan    Kahan matrix -- upper trapezoidal.
    kms      Kac-Murdock-Szego Toeplitz matrix.
    krylov   Krylov matrix.
    lauchli  Lauchli matrix -- rectangular.
    lehmer   Lehmer matrix -- symmetric positive definite.
    lesp     Tridiagonal matrix with real, sensitive eigenvalues.
    lotkin   Lotkin matrix.
    minij    Symmetric positive definite matrix MIN(i,j).
    moler    Moler matrix -- symmetric positive definite.
    neumann  Singular matrix from the discrete Neumann problem (sparse).
    orthog   Orthogonal and nearly orthogonal matrices.
    parter   Parter matrix -- a Toeplitz matrix with singular values near PI.
    pei      Pei matrix.
    poisson  Block tridiagonal matrix from Poisson's equation (sparse).
    prolate  Prolate matrix -- symmetric, ill-conditioned Toeplitz matrix.
    rando    Random matrix with elements -1, 0 or 1.
    randhess Random, orthogonal upper Hessenberg matrix.
    randsvd  Random matrix with pre-assigned singular values.
    redheff  Matrix of 0s and 1s of Redheffer.
    riemann  Matrix associated with the Riemann hypothesis.
    ris      Ris matrix -- a symmetric Hankel matrix.
    rosser   A classic symmetric eigenvalue test problem.
    smoke    Smoke matrix -- complex, with a "smoke ring" pseudospectrum.
    toeppd   Symmetric positive definite Toeplitz matrix.
    toeppen  Pentadiagonal Toeplitz matrix (sparse).
    tridiag  Tridiagonal matrix (sparse).
    triw     Upper triangular matrix discussed by Wilkinson and others.
    vander   Vandermonde matrix.
    wathen   Wathen matrix -- a finite element matrix (sparse, random entries).
    wilk     Various specific matrices devised/discussed by Wilkinson.
             (Two output arguments)

        % LINEAR SYSTEMS
        Err = [];
        mrange = 5:5:100;
        for m = mrange
          %A = gallery('chebspec',m);
          %A = A(2:m,2:m);
          %A = gallery('grcar',m);
          %A = gallery('condex',m);
          A = rand(m,m);
          dim = size(A,2);
          b = rand(dim,1);
          x = A\b;
          err = [];
          for k = 1:100
            B = A+1e-10*rand(dim,dim);
            xc = B\b;
            err = [err norm(x-xc,2)/norm(x,2)];
          end
          Err = [Err err'];
        end
        semilogy(mrange,Err,'*r')
        xlabel('matrix size','Fontweight','bold','Fontsize',18)
        ylabel('relative error','Fontweight','bold','Fontsize',18)
        title('Solution of linear system - random matrices', ...
            'Fontweight','bold','Fontsize',18)
        print -deps Err4.eps


        % EIGENVALUE PROBLEMS
        m = 100;
        %A = gallery('grcar',m);
        %A = gallery('jordbloc',m);
        %A = gallery('lesp',m);
        A = rand(m,m);
        dim = size(A,2);
        ev = eig(A);
        plot(real(ev),imag(ev),'or')
        hold on
        for k = 1:100
          B = A+1e-10*rand(dim,dim);
          evc = eig(B);
          plot(real(evc),imag(evc),'+b')
        end
        xlabel('real part','Fontweight','bold','Fontsize',18)
        ylabel('imaginary part','Fontweight','bold','Fontsize',18)
        title(['Eigenvalues of perturbed random matrix m = ' int2str(m)], ...
                'Fontweight','bold','Fontsize',18)
        print -deps Evc12.eps
        hold off

STABILITY OF SYSTEM SOLVE



STABILITY OF EIGENVALUE PROBLEM