% Matlab code LanczosDemo.m
% For "Applied Numerical Linear Algebra",  Chapter 7
% Written by James Demmel, Jun  6, 1997
%
% This program sets up the data for the plots of the
% Lanczos algorithm in Chapter 7
%
% e contains the eigenvalues, in decreasing order
clear e;
clear A;
e = [
     2.814172761275914e+00
     2.702868092389970e+00
     2.599089388576309e+00
     2.590000000000000e+00
     2.567541525093273e+00
     2.464503386572409e+00
     2.297364163401737e+00
     2.264314579523848e+00
     2.223670214225475e+00
     2.221554601045395e+00
     2.205565815386506e+00
     2.191477513171730e+00
     2.176997451239667e+00
     2.141411405120702e+00
     2.114364167621812e+00
     2.082245457397133e+00
     2.038797314674318e+00
     1.983336237065439e+00
     1.981158505826463e+00
     1.976752525746760e+00
     1.960011713185635e+00
     1.946408217258373e+00
     1.899539105865933e+00
     1.896394134910090e+00
     1.885266074552361e+00
     1.875151167753231e+00
     1.874919401677734e+00
     1.872410928929237e+00
     1.809780809862668e+00
     1.804991115962216e+00
     1.800713681981315e+00
     1.794575633324331e+00
     1.782194422110394e+00
     1.778440632065729e+00
     1.761733822059961e+00
     1.747151725807454e+00
     1.729533358237891e+00
     1.723121568497992e+00
     1.710935707717214e+00
     1.696463658152746e+00
     1.695370255516045e+00
     1.668614776151783e+00
     1.648422330780669e+00
     1.647910246473927e+00
     1.637716115829646e+00
     1.634492815870968e+00
     1.631294094118672e+00
     1.628794165754336e+00
     1.627327388339330e+00
     1.624684737512644e+00
     1.615626272458611e+00
     1.615538358366508e+00
     1.609788798237053e+00
     1.589167506337163e+00
     1.587349545357239e+00
     1.577748178770871e+00
     1.549142831694586e+00
     1.547098194026360e+00
     1.534346322589048e+00
     1.528290475453445e+00
     1.527880130975358e+00
     1.522717147338845e+00
     1.521077740440806e+00
     1.504005153942205e+00
     1.503916017312076e+00
     1.492501644302332e+00
     1.491751782874269e+00
     1.466744223308462e+00
     1.454824424559805e+00
     1.452542834461952e+00
     1.446157561633248e+00
     1.439591953875010e+00
     1.434973570346667e+00
     1.431883465556686e+00
     1.417523707944331e+00
     1.395687029609308e+00
     1.393327642067945e+00
     1.387768147470094e+00
     1.386754026680997e+00
     1.382282003721680e+00
     1.381345358648590e+00
     1.379391718669028e+00
     1.376511886216141e+00
     1.366888646018867e+00
     1.365130303751517e+00
     1.361865319658340e+00
     1.354896340254757e+00
     1.354264286673819e+00
     1.349890973291788e+00
     1.348012209859281e+00
     1.345743474588567e+00
     1.336713441927213e+00
     1.334428658624381e+00
     1.328348554208370e+00
     1.323368339770760e+00
     1.299462296585722e+00
     1.298285046546736e+00
     1.290378611197025e+00
     1.273368654847427e+00
     1.266383935462175e+00
     1.265567192923866e+00
     1.253506921486508e+00
     1.236610078457600e+00
     1.230991193492089e+00
     1.220723516524943e+00
     1.210256108699021e+00
     1.205525908139025e+00
     1.195705859305018e+00
     1.187777561904628e+00
     1.187338780307629e+00
     1.182242623452297e+00
     1.180546076345981e+00
     1.176773431118794e+00
     1.174598405937207e+00
     1.166396762147766e+00
     1.164217336041898e+00
     1.160388436707654e+00
     1.155532079689273e+00
     1.152847300548125e+00
     1.124338018488419e+00
     1.120779821094616e+00
     1.118325369558712e+00
     1.107781521007349e+00
     1.106052359887209e+00
     1.105970622057378e+00
     1.095427763480353e+00
     1.088334677219525e+00
     1.085427889340109e+00
     1.079241109603014e+00
     1.077964337154984e+00
     1.063471040151568e+00
     1.053155114354777e+00
     1.044539426259677e+00
     1.042999732908824e+00
     1.011286574400972e+00
     1.002860952570944e+00
     1.000514878574387e+00
     9.998564581630793e-01
     9.994183136871532e-01
     9.971347830589946e-01
     9.872105462517649e-01
     9.823330777806912e-01
     9.821913155911621e-01
     9.820727783004638e-01
     9.803908880463560e-01
     9.792899529398326e-01
     9.777257415706565e-01
     9.769811960296341e-01
     9.727143760041068e-01
     9.726027707646057e-01
     9.698234482071247e-01
     9.666641109512404e-01
     9.548817568993129e-01
     9.545046951296819e-01
     9.527693391591844e-01
     9.502194845165924e-01
     9.489856086242334e-01
     9.458318137771293e-01
     9.384217345821153e-01
     9.306684563989538e-01
     9.251326488396172e-01
     9.238742283106673e-01
     9.209571565944747e-01
     9.198648682835804e-01
     9.095865872703239e-01
     9.077356221456525e-01
     9.076444788194660e-01
     9.057906133319076e-01
     9.044936562097138e-01
     9.018409993814690e-01
     8.969650607633661e-01
     8.964651994655619e-01
     8.917146544182467e-01
     8.901785908317146e-01
     8.773801791545754e-01
     8.742113112123299e-01
     8.725282415510507e-01
     8.627603915724462e-01
     8.623360347923923e-01
     8.621817117429286e-01
     8.558648328933578e-01
     8.519576933634193e-01
     8.490643819551014e-01
     8.484053855613746e-01
     8.426370524948747e-01
     8.310866698120055e-01
     8.280451212387822e-01
     8.278777292232313e-01
     8.196042025850531e-01
     8.127403936997335e-01
     8.117466571012893e-01
     8.114824141608529e-01
     8.049628144026407e-01
     8.041554366062765e-01
     7.992283046517941e-01
     7.983154526702361e-01
     7.979809263882423e-01
     7.944415369157730e-01
     7.897981473509575e-01
     7.878085413317077e-01
     7.859204501425998e-01
     7.851823972083567e-01
     7.846020237031537e-01
     7.827714128532863e-01
     7.759235274347638e-01
     7.692335230000520e-01
     7.679217266883074e-01
     7.668462786032512e-01
     7.629918382209249e-01
     7.536050048937679e-01
     7.521793169525678e-01
     7.501646953757070e-01
     7.419371612093327e-01
     7.400157337228112e-01
     7.389877572575370e-01
     7.375565100264373e-01
     7.361823480503606e-01
     7.332455666115849e-01
     7.314783461645973e-01
     7.262978959317072e-01
     7.224320572262753e-01
     7.207620780165328e-01
     7.168761064249926e-01
     7.122305273296260e-01
     7.095074430694971e-01
     7.091540355382334e-01
     7.049816366039948e-01
     7.025830971665669e-01
     7.018504548568532e-01
     6.997864656849211e-01
     6.953894773704008e-01
     6.897750059040668e-01
     6.864422817616285e-01
     6.821158159396418e-01
     6.814490518359390e-01
     6.799906898081874e-01
     6.783773839317427e-01
     6.775393943042597e-01
     6.771252206223564e-01
     6.746418808915936e-01
     6.685441997274237e-01
     6.652104294228470e-01
     6.626521231428836e-01
     6.624423192820305e-01
     6.573153083772928e-01
     6.537348389244239e-01
     6.510846656912235e-01
     6.471514941255024e-01
     6.448177343484881e-01
     6.442427235449043e-01
     6.343558188014231e-01
     6.316713185235080e-01
     6.308728404251891e-01
     6.171612533668310e-01
     6.171465498181745e-01
     6.157744733699031e-01
     6.143880317107526e-01
     6.131345368369050e-01
     6.076887728100472e-01
     6.070659291748848e-01
     6.016061393381084e-01
     5.981085824664042e-01
     5.970117983306417e-01
     5.916859184801805e-01
     5.888708937461894e-01
     5.873096762241259e-01
     5.825075425890075e-01
     5.746256044918595e-01
     5.731379707833467e-01
     5.712471138744771e-01
     5.698810156077480e-01
     5.618567493822922e-01
     5.599794812210576e-01
     5.524589362343846e-01
     5.517183256296000e-01
     5.504542623253720e-01
     5.495004619560291e-01
     5.476306132610074e-01
     5.460724638416559e-01
     5.448635933409138e-01
     5.425242883964949e-01
     5.410803569260377e-01
     5.383486602802743e-01
     5.374488617331898e-01
     5.330590556657384e-01
     5.253116633523929e-01
     5.246453109269812e-01
     5.230668754991178e-01
     5.208621437958987e-01
     5.195808175032971e-01
     5.172415761389157e-01
     5.135101787428046e-01
     5.109722884050408e-01
     5.104085190128229e-01
     5.079911535058407e-01
     5.056599548051781e-01
     5.047498329393025e-01
     5.029856460129329e-01
     5.022763616115343e-01
     5.022447757663085e-01
     5.000930147913137e-01
     4.966404671092932e-01
     4.893969298272313e-01
     4.866478788299100e-01
     4.839611072859792e-01
     4.814081077626376e-01
     4.765865047245898e-01
     4.761072087365594e-01
     4.729682479329673e-01
     4.697215907098490e-01
     4.687896281772054e-01
     4.670779261667696e-01
     4.669082295536648e-01
     4.663887743859166e-01
     4.609394074218473e-01
     4.554392989140636e-01
     4.531604959547276e-01
     4.510848942215426e-01
     4.503337531279842e-01
     4.499655201752542e-01
     4.437798326603709e-01
     4.422842403451581e-01
     4.421778476758425e-01
     4.386596437479469e-01
     4.366445404939974e-01
     4.306906766127277e-01
     4.290696578242608e-01
     4.267083113563218e-01
     4.242373685604993e-01
     4.202806839480185e-01
     4.113656416441749e-01
     4.113367517463140e-01
     4.098243861112325e-01
     4.083744655079384e-01
     4.027031321521145e-01
     4.009798556017321e-01
     4.002422382515000e-01
     4.001020676662038e-01
     3.973899595491410e-01
     3.908999796964506e-01
     3.899446785206924e-01
     3.895254997455134e-01
     3.883387343170143e-01
     3.731849759700183e-01
     3.718170281615460e-01
     3.715696761144308e-01
     3.687935113852634e-01
     3.629447534241654e-01
     3.628229768716142e-01
     3.618783390179271e-01
     3.577061994178195e-01
     3.575602368044170e-01
     3.546416221083838e-01
     3.497910203154285e-01
     3.487545106297563e-01
     3.481407025354845e-01
     3.465358819381597e-01
     3.407559530867063e-01
     3.378549964210653e-01
     3.354954840233279e-01
     3.340421990042393e-01
     3.334486808055002e-01
     3.263606171834916e-01
     3.261671725545078e-01
     3.205867238714797e-01
     3.189109304500357e-01
     3.147305749724285e-01
     3.100799711308060e-01
     3.073434417465249e-01
     3.068729206481784e-01
     3.052467800616375e-01
     3.044413451844519e-01
     3.001408497765567e-01
     2.971594004332515e-01
     2.940321063248696e-01
     2.920444060328289e-01
     2.913027197833263e-01
     2.888135984458266e-01
     2.875674993311529e-01
     2.862357117736598e-01
     2.860020969605299e-01
     2.834214111815491e-01
     2.787156883914136e-01
     2.785049939994917e-01
     2.759679639534119e-01
     2.758158715731522e-01
     2.681171914170060e-01
     2.663699131687433e-01
     2.575383420333777e-01
     2.561408558150992e-01
     2.553506421896051e-01
     2.493687112854922e-01
     2.490629031072837e-01
     2.489974165362996e-01
     2.489178420774880e-01
     2.486502893838174e-01
     2.485253166236164e-01
     2.466590759670788e-01
     2.450974203342348e-01
     2.420950596011335e-01
     2.386668081598394e-01
     2.386488149412505e-01
     2.371028359810034e-01
     2.226397285286042e-01
     2.202790068353938e-01
     2.198712212044884e-01
     2.198224584002550e-01
     2.194231722187341e-01
     2.147333294372702e-01
     2.143371071253096e-01
     2.140362201394800e-01
     2.096475964381141e-01
     2.034097331901550e-01
     1.991428827282775e-01
     1.962111015652214e-01
     1.948430971283786e-01
     1.942125321792905e-01
     1.924231669851466e-01
     1.924139460512030e-01
     1.899150310967977e-01
     1.789276431167263e-01
     1.762203106434360e-01
     1.754764670553700e-01
     1.731560871632044e-01
     1.716802894077261e-01
     1.709069332587761e-01
     1.704811037649729e-01
     1.681343305780836e-01
     1.647967975704322e-01
     1.618921162148324e-01
     1.594530329145495e-01
     1.590056633295659e-01
     1.585552073464137e-01
     1.583442062973209e-01
     1.518716461667465e-01
     1.492011891110445e-01
     1.480056825594030e-01
     1.479191456383008e-01
     1.471945309977338e-01
     1.446632829612871e-01
     1.446218693795739e-01
     1.427816372335876e-01
     1.426533837388823e-01
     1.347047728313046e-01
     1.341161031054156e-01
     1.308930304301959e-01
     1.297038391690410e-01
     1.295179666516733e-01
     1.279022947430479e-01
     1.246928673377514e-01
     1.225912389122154e-01
     1.212630551867155e-01
     1.183515693492407e-01
     1.179456229178035e-01
     1.174896071657676e-01
     1.154544132687881e-01
     1.152385477825062e-01
     1.085751143405187e-01
     1.081134611059874e-01
     1.035242215892689e-01
     1.034327090723891e-01
     1.024273895944277e-01
     9.212894429064648e-02
     8.993989165194118e-02
     8.492346734663844e-02
     8.239203354031284e-02
     8.171924395086792e-02
     7.261300902272112e-02
     6.401881703744806e-02
     6.325906484766856e-02
     5.735792176708781e-02
     5.724010490356946e-02
     5.216655871202804e-02
     5.167411259658868e-02
     4.818020761837948e-02
     4.634501388736477e-02
     3.942730554142763e-02
     3.675880166009582e-02
     3.306994693806183e-02
     2.704145710762689e-02
     2.167855937903246e-02
     2.046941122032900e-02
     1.688755056836573e-02
     1.688233130543152e-02
     1.567617485785141e-02
     1.537348676571341e-02
     6.946221166714416e-03
     2.816510408217363e-03
                         0
    -5.227999900795354e-04
    -4.625466562209516e-03
    -5.437088430845619e-03
    -5.964946676617970e-03
    -6.846900954268731e-03
    -1.147367779283034e-02
    -1.464626665269652e-02
    -1.723152894298831e-02
    -1.737906851672140e-02
    -1.909851478343364e-02
    -2.195867096106267e-02
    -3.015418194360474e-02
    -3.143468561301888e-02
    -3.410257537513417e-02
    -3.449185270771437e-02
    -3.921864205802917e-02
    -4.047254160632302e-02
    -4.558289680040785e-02
    -5.315083387410681e-02
    -6.197683396416529e-02
    -6.226872871088768e-02
    -6.234062064636535e-02
    -6.657403699493201e-02
    -6.738378832632407e-02
    -6.755313546599839e-02
    -6.793523683120127e-02
    -6.840572481728423e-02
    -7.157765480949277e-02
    -7.190117015833750e-02
    -7.919928182975325e-02
    -8.656373512022858e-02
    -8.998248143089517e-02
    -9.923965209702956e-02
    -1.004854519717561e-01
    -1.018304504235476e-01
    -1.029748894020427e-01
    -1.039013018480994e-01
    -1.039663426931064e-01
    -1.060103371774936e-01
    -1.086710631990107e-01
    -1.104864690884848e-01
    -1.152522520707936e-01
    -1.160729806184739e-01
    -1.162365559884888e-01
    -1.170342831423336e-01
    -1.210671439889095e-01
    -1.210704923018525e-01
    -1.232217287712491e-01
    -1.242153671121737e-01
    -1.261857849536120e-01
    -1.332103692949168e-01
    -1.333601019785980e-01
    -1.334752472087699e-01
    -1.343127896454944e-01
    -1.381701338111096e-01
    -1.401520209131779e-01
    -1.444262310259719e-01
    -1.464347031337782e-01
    -1.510627713602054e-01
    -1.546712496121807e-01
    -1.604482484696246e-01
    -1.614982870799017e-01
    -1.665099403677714e-01
    -1.692086668396521e-01
    -1.776353535464270e-01
    -1.816491779691418e-01
    -1.820310741705353e-01
    -1.851961284563068e-01
    -1.853190981021963e-01
    -1.876112602624920e-01
    -1.915399670127556e-01
    -1.923096705939996e-01
    -1.937722100095089e-01
    -1.985604369755659e-01
    -2.009403757293378e-01
    -2.018397115141196e-01
    -2.020381309401098e-01
    -2.111179690074962e-01
    -2.118632938849603e-01
    -2.168458775070385e-01
    -2.192643234979968e-01
    -2.213351262142895e-01
    -2.234370984413179e-01
    -2.236173848954764e-01
    -2.275896955785031e-01
    -2.282959998121906e-01
    -2.287598712420512e-01
    -2.297897928751893e-01
    -2.326381429757760e-01
    -2.344456045561057e-01
    -2.348627269193264e-01
    -2.405126577517509e-01
    -2.412372971395529e-01
    -2.413128900180356e-01
    -2.443052353274913e-01
    -2.447193978037017e-01
    -2.457597346779671e-01
    -2.543858316767582e-01
    -2.570561423569012e-01
    -2.579571542784349e-01
    -2.581683206411707e-01
    -2.587401402655778e-01
    -2.621513182821887e-01
    -2.652240119977087e-01
    -2.653987710422074e-01
    -2.668707328998682e-01
    -2.669787085846202e-01
    -2.685570641412207e-01
    -2.704950836557283e-01
    -2.707608850860936e-01
    -2.713585492937157e-01
    -2.771412654658467e-01
    -2.847523824941883e-01
    -2.884652401252867e-01
    -2.907298551438189e-01
    -2.916129174270827e-01
    -2.951112855259487e-01
    -2.974569416996112e-01
    -2.986277343239475e-01
    -3.042878930889002e-01
    -3.053313093908925e-01
    -3.073303265085731e-01
    -3.077278287881228e-01
    -3.090668977409004e-01
    -3.124974891394885e-01
    -3.138913187033672e-01
    -3.154255856705280e-01
    -3.182875382891599e-01
    -3.191825312026095e-01
    -3.192795832812836e-01
    -3.194065473041465e-01
    -3.195657384664275e-01
    -3.244366473179164e-01
    -3.250778631971307e-01
    -3.276299467193854e-01
    -3.290783782029383e-01
    -3.296621922125321e-01
    -3.328533962622742e-01
    -3.370671403736583e-01
    -3.456431200899477e-01
    -3.468354431674379e-01
    -3.500390182130453e-01
    -3.507179624031275e-01
    -3.549663758459092e-01
    -3.620276587290726e-01
    -3.633186130019083e-01
    -3.657313061646582e-01
    -3.693462255408775e-01
    -3.714608239084705e-01
    -3.783117717475533e-01
    -3.791489734554478e-01
    -3.795618508112106e-01
    -3.801599385316975e-01
    -3.839100302499200e-01
    -3.840607015202953e-01
    -3.848589745416982e-01
    -4.010432561218844e-01
    -4.039627447033776e-01
    -4.048060196897558e-01
    -4.098220313251607e-01
    -4.220359302945716e-01
    -4.249295414158606e-01
    -4.261793237933721e-01
    -4.283348932596768e-01
    -4.286747483250994e-01
    -4.295164034528831e-01
    -4.344148403033928e-01
    -4.374727839386152e-01
    -4.394857015725637e-01
    -4.424400348461840e-01
    -4.430308063152187e-01
    -4.447981014027812e-01
    -4.493951904707346e-01
    -4.519843650224026e-01
    -4.526551487021063e-01
    -4.543766973748566e-01
    -4.680110396649241e-01
    -4.763274411171102e-01
    -4.806891514239888e-01
    -4.832475570602535e-01
    -4.836456052203129e-01
    -4.901521265256848e-01
    -4.915611011779411e-01
    -4.929388399922074e-01
    -5.013984869422718e-01
    -5.024367481662750e-01
    -5.037060584601669e-01
    -5.037226917408690e-01
    -5.041019159385837e-01
    -5.052555809298982e-01
    -5.067342025285031e-01
    -5.103307366550444e-01
    -5.125479484564651e-01
    -5.167514596069657e-01
    -5.178705126271491e-01
    -5.205776391502475e-01
    -5.229842865362371e-01
    -5.235348649820759e-01
    -5.354801350862215e-01
    -5.378558772245632e-01
    -5.392330521117620e-01
    -5.420260810831364e-01
    -5.426206860833854e-01
    -5.485279057886133e-01
    -5.509478248894413e-01
    -5.520724635229436e-01
    -5.604487994726992e-01
    -5.642070089016296e-01
    -5.809777128551150e-01
    -5.842009754973538e-01
    -5.904836694252560e-01
    -5.936822148581347e-01
    -5.950505372839330e-01
    -5.988825542804712e-01
    -5.989466147309781e-01
    -6.012800186986897e-01
    -6.023116756191477e-01
    -6.038522605739941e-01
    -6.082237441395211e-01
    -6.107645060169964e-01
    -6.163961102759636e-01
    -6.183615801956889e-01
    -6.198966460398777e-01
    -6.204104902164255e-01
    -6.250179411250268e-01
    -6.302145531531684e-01
    -6.309963986564435e-01
    -6.337114282440103e-01
    -6.344302283077828e-01
    -6.367290445092452e-01
    -6.372323448048847e-01
    -6.412657628399866e-01
    -6.436016519675243e-01
    -6.451382254701533e-01
    -6.477769860708740e-01
    -6.543056844359574e-01
    -6.545899979028399e-01
    -6.571692789196142e-01
    -6.637269534115563e-01
    -6.677174438148598e-01
    -6.677711272171426e-01
    -6.700819194071875e-01
    -6.762549036585710e-01
    -6.765420669429114e-01
    -6.819558189736320e-01
    -6.824795547670004e-01
    -6.829062944326997e-01
    -6.856969932587470e-01
    -6.894665273049805e-01
    -6.900259125146675e-01
    -6.907203981795431e-01
    -6.910054626166023e-01
    -6.918151520652348e-01
    -6.938680942449645e-01
    -6.960009170985646e-01
    -6.967748879510745e-01
    -7.041975420321398e-01
    -7.055754972416881e-01
    -7.114401714728208e-01
    -7.124614006478374e-01
    -7.137168086504131e-01
    -7.152993526303730e-01
    -7.296771987266026e-01
    -7.315855977925664e-01
    -7.319536393669366e-01
    -7.340162495430932e-01
    -7.405026975374324e-01
    -7.407739377002828e-01
    -7.443713399257872e-01
    -7.552386606406160e-01
    -7.600690725554217e-01
    -7.622752901427726e-01
    -7.685722292029393e-01
    -7.718989805653201e-01
    -7.789853698588516e-01
    -7.864556112324077e-01
    -7.970067372219823e-01
    -7.981573006360425e-01
    -8.059388038914668e-01
    -8.080513033803405e-01
    -8.105578290045155e-01
    -8.144322970265743e-01
    -8.173677238420918e-01
    -8.174480105844039e-01
    -8.230163019342360e-01
    -8.233572330056267e-01
    -8.307284448000266e-01
    -8.319527320030121e-01
    -8.335032317515032e-01
    -8.347800356884858e-01
    -8.355648860194642e-01
    -8.391548715810412e-01
    -8.414928172744274e-01
    -8.463720906942722e-01
    -8.483576614949478e-01
    -8.489759007963682e-01
    -8.512979319453798e-01
    -8.517824252459794e-01
    -8.533874719341034e-01
    -8.562099889251256e-01
    -8.588307035237146e-01
    -8.621250321316691e-01
    -8.646800531729438e-01
    -8.675355277294233e-01
    -8.719010387260251e-01
    -8.744703604340530e-01
    -8.789980512639792e-01
    -8.809849017605375e-01
    -8.817289863683289e-01
    -8.824246951960432e-01
    -8.877409307680681e-01
    -8.901564391629794e-01
    -8.903335696648073e-01
    -8.916973811054563e-01
    -8.958826756419767e-01
    -9.006088359175736e-01
    -9.007376670170124e-01
    -9.022931587992679e-01
    -9.036901176420007e-01
    -9.128391750007560e-01
    -9.136748616027766e-01
    -9.187748997004715e-01
    -9.225731051076336e-01
    -9.271749756728670e-01
    -9.306131340775153e-01
    -9.306435405713818e-01
    -9.441719877506813e-01
    -9.455465477403006e-01
    -9.467370837788638e-01
    -9.468763595074298e-01
    -9.480675090822196e-01
    -9.666377133028524e-01
    -9.805224849425299e-01
    -9.827308509161072e-01
    -9.834965722146312e-01
    -9.894906680396686e-01
    -1.002398056013348e+00
    -1.003708014597806e+00
    -1.005378256204932e+00
    -1.008546398160553e+00
    -1.010090414362058e+00
    -1.010685963983892e+00
    -1.014743804378010e+00
    -1.037066379704814e+00
    -1.037948023310447e+00
    -1.039030224423994e+00
    -1.039461428544475e+00
    -1.039595848992490e+00
    -1.040624560707305e+00
    -1.044507735757793e+00
    -1.044971509775652e+00
    -1.046642822061536e+00
    -1.053406328916273e+00
    -1.055067598324011e+00
    -1.055195957902107e+00
    -1.058492375253713e+00
    -1.067460854015524e+00
    -1.069426393117942e+00
    -1.085290649589177e+00
    -1.092334216026481e+00
    -1.119710317940900e+00
    -1.125125904844051e+00
    -1.128591503800964e+00
    -1.135050287854938e+00
    -1.136283780309037e+00
    -1.140296645519639e+00
    -1.143309977915882e+00
    -1.153057238108601e+00
    -1.157175237021103e+00
    -1.160879686988841e+00
    -1.163730538737534e+00
    -1.169440959728734e+00
    -1.171467202847926e+00
    -1.184551974725294e+00
    -1.186295663952472e+00
    -1.187531477322901e+00
    -1.190178445211852e+00
    -1.190505039291428e+00
    -1.191860572775358e+00
    -1.192777142629285e+00
    -1.198170542878698e+00
    -1.208181248725702e+00
    -1.208692427947186e+00
    -1.212183792592666e+00
    -1.220876938943361e+00
    -1.225617917892235e+00
    -1.228584274000599e+00
    -1.229796414246055e+00
    -1.231363524969563e+00
    -1.241357808713041e+00
    -1.244353359970873e+00
    -1.246541297166246e+00
    -1.246984022058110e+00
    -1.253090233263294e+00
    -1.259053934901283e+00
    -1.263919003306782e+00
    -1.264258927301533e+00
    -1.286172925567220e+00
    -1.286889631829043e+00
    -1.287207551741598e+00
    -1.293646516642696e+00
    -1.295966580631288e+00
    -1.305682563806468e+00
    -1.309865361830589e+00
    -1.314548837678522e+00
    -1.323854177144799e+00
    -1.341659672638082e+00
    -1.344367297940722e+00
    -1.345705651343995e+00
    -1.355526480327442e+00
    -1.355620800938762e+00
    -1.357143348078764e+00
    -1.374351322741302e+00
    -1.378995287033635e+00
    -1.382821265307169e+00
    -1.383154932734895e+00
    -1.394543890579591e+00
    -1.394917626969451e+00
    -1.398067334578037e+00
    -1.400116391151908e+00
    -1.403092089126682e+00
    -1.403556571327210e+00
    -1.403855044604432e+00
    -1.407070682906490e+00
    -1.416205004683003e+00
    -1.421082065994171e+00
    -1.421743385936549e+00
    -1.421873947754551e+00
    -1.429718511937935e+00
    -1.444621990876926e+00
    -1.462700675918538e+00
    -1.467068305736082e+00
    -1.481366870780631e+00
    -1.483391957924591e+00
    -1.483660100909367e+00
    -1.492069835564497e+00
    -1.497365595069318e+00
    -1.502966895672222e+00
    -1.505118391770502e+00
    -1.512200133474730e+00
    -1.522576171064318e+00
    -1.538718090381602e+00
    -1.544645098489517e+00
    -1.552408029611485e+00
    -1.558731914742604e+00
    -1.558780806601906e+00
    -1.561379493829527e+00
    -1.568340108646224e+00
    -1.583442008832622e+00
    -1.588271595787691e+00
    -1.589293227580283e+00
    -1.590043008821839e+00
    -1.614555822463893e+00
    -1.629332384721316e+00
    -1.632682423040393e+00
    -1.634272132186845e+00
    -1.634920480412634e+00
    -1.636147392146567e+00
    -1.691386348976873e+00
    -1.691447440677780e+00
    -1.698014023591858e+00
    -1.703217748442569e+00
    -1.708704966984664e+00
    -1.709480370403322e+00
    -1.710599237326115e+00
    -1.726726948410559e+00
    -1.730288628034325e+00
    -1.737309784462294e+00
    -1.738356579980257e+00
    -1.747186507053824e+00
    -1.757190207543247e+00
    -1.763681660226581e+00
    -1.768747693576448e+00
    -1.778573154030168e+00
    -1.779706848125240e+00
    -1.819111121829654e+00
    -1.826180623522087e+00
    -1.832786945637583e+00
    -1.838592748104771e+00
    -1.844856354089162e+00
    -1.845960307846103e+00
    -1.871368372004807e+00
    -1.943521662616528e+00
    -1.945530529869775e+00
    -1.977665062182286e+00
    -2.002617012675329e+00
    -2.007575801883501e+00
    -2.030517430606240e+00
    -2.077592804123785e+00
    -2.083402624447221e+00
    -2.088449147529314e+00
    -2.141856786835564e+00
    -2.163020465741229e+00
    -2.166555567248353e+00
    -2.171506049585648e+00
    -2.195858850871426e+00
    -2.236062291631339e+00
    -2.272136014308809e+00
    -2.301397038490328e+00
    -2.312010983400736e+00
    -2.395908327455480e+00
    -2.405710960666630e+00
    -2.453041863767092e+00
    -2.481720296617010e+00
    -2.570669742556306e+00
    -2.628007693328433e+00
    -2.639617982001896e+00
    -2.700000000000000e+00
    -2.700001000000000e+00
    -2.814111235789722e+00
    -3.026665892769740e+00
];
%
% A is a 1000x1000 diagonal sparse matrix with e as eigenvalues
%
A = spdiags(e,0,1000,1000); 
%
% q is the starting vector for Lanczos (unnormalized)
%
q = ones(1000,1);
q(999) = 1e-5;
%
% m is the number of Lanczos steps to take
%
m = 99;
%
% The following paramters control the printing
% 
%   mm1,mm2 = indices of extreme eigenvalues for which to plot error
%             and error bounds
mm1 = 1;
mm2 = 4;
%
%   mine, maxe = range in which to plot eigenvalues
mine = -4;
maxe =  4;
%
%   steplabel = array of values at which to draw vertical lines in plots
steplabel = (10:10:150);
%
%   recomp = 1 to perform algorithm from scratch
%          = 0 just to redisplay data, with possibly different
%               mine, maxe, mm1, mm2, steplabel
recomp = 1;
%
%   whichbound = 2 to plot all errors and error bounds
%              = 1 to plot local error and error bounds
%              = 0 to plot error bounds only
whichbound = 2;
%
%   displayselection = 1 to display details of which Ritz vectors
%                      are selected, as Lanczos runs
%                    = 0 not to display details
displayselection = 0;
