function[L,Astr,Estr,bodystr,Fbar,DBCNodeCode,DBCNodeValue,...
         nel,nen,nnp,eltype,nip,xhat,nelpp,...
         xexact,uexact] = me180_lab07_input_deck()

    % Length of the domain.
    L = 13.72*pi;

    % The following are strings that can be used by the 'eval' command to
    % calculate the area, stiffness, and body forces.
    % I will always evaluate them at a point 'xe'.
    Astr = 'pi*(0.1^2)*(1 - 0.9*xe/L)';
    Estr = '7e10*(1+xe)';
    bodystr = '500 + 10*xe';
    bodystr = '400000000*sin(0.5*xe)*xe';

    % Neumann BCs.
    Fbar = [12.7; 0];

    % For Dirichelt BCs, we can't just have a list of values; we need to know which
    % nodes (or positions) have Dirichlet BCs, and then for each node (or position),
    % we need to know the value of the Dirichlet BC.
    %
    % Since we don't know which node corresponds to what physical location,
    % the positions in the DBC structures correspond to the left and right of the
    % domain.
    DBCNodeCode = [0; 1];
    DBCNodeValue = [0; 1.19];

    % number of elements
    nel = 7;
    %nel = 100;

    % element type: 1=linear
    %               2=quadratic
    eltype = 2;

    % Calculations of some other quantities based on the element type;
    % these are not to be modified by the user.
    % nen = number of element nodes (i.e., the number of nodes
    %                                      per element)
    % nnp = number of nodal points (in the whole domain)
    if (eltype == 1)
        nen = 2;
        nnp = nel+1;
    elseif (eltype == 2)
        nen = 3;
        nnp = (nel*2)+1;
    end

    % number of integration points
    nip = 2;

    % mesh type: 0=typical
    %            1=random
    meshtype = 1;

    % Calculate the vector of nodal positions.
    xhat = Buildxhat(meshtype,L,nnp);

    % Number of element plot points: this is used to ensure that the element
    % curvature is plotted appropriately.
    nelpp = 10;

    % Create the exact solution
exact = [37.714819806345467   1.428091906451233;
   7.025732146782071   0.150778424012544;
  26.378822538838204   1.778628448070082;
  28.620160401615305   2.305643084828625;
  17.111752529279030   1.360222058236814;
  30.602882357148896   1.111769643864128;
  24.827127095377133   0.693291748109460;
  33.964889151314551  -1.694559796947477;
  11.335997267507267   0.330786708794563;
   7.241245402818330   0.086549985124334;
  24.094382024853847   0.187644370246393;
  25.818488073143925   1.413209840878600;
  26.249514585216446   1.699362865568933;
  27.844312679884769   2.339357034193146;
   5.560242005735503   0.669311301222645;
   9.051556753522913  -0.184099677808063;
  18.146216158253075   0.866668635378384;
  42.973343253630212   1.603529454308963;
   7.284348054025582   0.074319093993896;
  35.387276641153861  -1.474356261689485;
  30.171855845076376   1.486205759461918;
  12.456666198895817   0.824998353109050;
  26.292617236423698   1.726173758729374;
  19.266885089641629   0.236500282710931;
  39.826849715500813   4.526505903845154;
  11.120484011471007   0.246671173240549;
  42.068187578277914   3.827580665805993;
  22.758199837429036  -0.461243136553945;
   1.767208699497331   1.554727777602121;
  26.465027841252706   1.829435939778590;
  34.568326268216076  -1.758860071521546;
  12.887692710968338   1.020325846224892;
  16.766931319621015   1.483606193913644;
  20.301348718615674  -0.274500043083533;
  12.758384757346581   0.962422437026215;
   0.732745070523283   1.583850151896548;
  27.715004726263015   2.320440577687550;
   1.982721955533590   1.540448843062925;
   1.120668931388551   1.578880568454783;
   9.568788568009936  -0.150945984275720;
  30.947703566806911   0.782539137454016;
  17.672086994973306   1.111963546474077;
   8.534324939035889  -0.164679005003125;
  13.534232479077117   1.291035872931909;
   4.051649213481685   1.176454448955260;
  41.550955763790896   4.563373626163449;
  11.422202569921771   0.365843375992074;
  23.318534303123311  -0.245230338044716;
   7.327450705232834   0.062306591130664;
   4.094751864688937   1.164238168501235;
  42.413008787935929   3.121010769818417;
   9.654993870424439  -0.140264234930960;
  18.534140019118343   0.651150182355646;
   1.681003397082827   1.559460341790151;
  19.525500996885139   0.096002316400939;
   5.043010191248480   0.857573705148860;
   0.086205302414504   1.585241217035165;
   6.292987076258787   0.398822377220746;
  38.749283435319519   3.136956965362862;
  39.223412598599289   3.830481125480296;
  30.732190310770651   0.990870337917244;
   3.663725352616417   1.278298362713031;
  17.499676390144298   1.193917582535725;
   3.448212096580157   1.328272851325094;
  40.904415995682115   4.962023484286822;
   9.353275311973677  -0.171220949369772;
   1.810311350704582   1.552158289230349;
   1.034463628974047   1.580446003500632;
  31.163216822843172   0.567586697284726;
  15.947980946683227   1.668192459111863;
   6.810218890745810   0.219587089216530;
  36.938972084614932   0.197970912341911;
  21.982352115698500  -0.600931243633619;
  35.861405804433637  -1.110045443251424;
  40.430286832402345   4.921615796561288;
  40.947518646889364   4.952400746657220;
  15.560057085817959   1.697841349632673;
  42.369906136728680   3.218866798461830;
   8.620530241450393  -0.171471308047536;
  16.723828668413763   1.497245144758515;
  18.189318809460328   0.843219866119076;
  20.689272579480942  -0.417383217927841;
   8.275709031792378  -0.136115535356367;
   2.543056421227866   1.484651946687362;
   9.396377963180928  -0.167903585201839;
   5.775755261771764   0.589225937143843;
   4.137854515896189   1.151849979605378;
  40.085465622744330   4.738213795389065;
  29.913239937832863   1.685331124255622;
   1.508592792253819   1.567397002614192;
  33.275246731998514  -1.371201489652219;
   0.775847721730535   1.583529719747888;
   5.517139354528251   0.685273865932828;
  40.602697437231349   4.966327596200117;
  36.292432316506151  -0.659799331897937;
  11.551510523543527   0.419762656144820;
  39.869952366708070   4.565841134078498;
  17.154855180486283   1.343101897122285;
  18.016908204631321   0.936021597350710;
  19.137577136019871   0.308603831132935;
  25.473666863485910   1.167266929125751;
  12.025639686823299   0.628044820662524;
  35.214866036324857  -1.570872130194460;
  18.792755926361856   0.504111623644190;
  12.844590059761085   1.001117439472375;
   9.525685916802685  -0.155737431022219;
  15.430749132196203   1.699297074134017;
   9.094659404730164  -0.183365933039632;
  34.137299756143555  -1.735358085465520;
   4.827496935212220   0.932720737876729;
  29.352905472138588   2.036614726304115;
  12.327358245274063   0.765684340723260;
  27.068464958154234   2.130254803058786;
  12.241152942859557   0.726178061657762;
  29.525316076967595   1.941110418767414;
  14.266977549600400   1.533602991277778;
  37.628614503930962   1.284857671213040;
   7.844682519719857  -0.062826173817482;
   6.336089727466039   0.383309854811386;
  14.827312015294675   1.651844745726518;
  23.749560815195832  -0.021394311910206;
  25.215050956242401   0.977832294867291;
  14.137669595978645   1.497318517126653;
   3.620622701409165   1.288680016771655;
  11.594613174750778   0.438062091407292;
   7.887785170927110  -0.071512872150800;
   6.077473820222527   0.477421041151129;
   7.672271914890850  -0.025268587470313;
  35.516584594775615  -1.389236490604383;
  30.645985008356146   1.071851198559512;
  11.508407872336274   0.401621414048215;
   9.870507126460700  -0.107211602721421;
  18.965166531190864   0.405980999816961;
  17.370368436522540   1.252299125798977;
  14.482490805636660   1.586881737104229;
   9.999815080082456  -0.083097865436650;
  32.542501661475235  -0.802261558262415;
  23.792663466403084   0.003402808619191;
  13.491129827869864   1.274304503066428;
  31.033908869221413   0.697224827979620;
  24.051279373646597   0.160256032583662;
   5.387831400906496   0.732949678952436;
  33.620067941656529  -1.563106013705091;
  38.232051620832493   2.296235680482359;
  29.309802820931335   2.058647086384110;
  17.025547226864525   1.393367737863048;
  18.232421460667581   0.819622392577978;
  28.964981611273320   2.207384773726202;
  41.637161066205401   4.467298002800929;
  22.197865371734760  -0.581454461112487;
  14.654901410465667   1.622608888115144;
   7.542963961269094   0.005715127521088;
   5.603344656942755   0.653322851402603;
  14.913517317709180   1.663936469437218;
   2.198235211569850   1.522361054248988;
  10.301533638533220  -0.014774468611543;
  41.292339856547379   4.789714996505738;
  36.033816409262641  -0.942924808433335;
  35.171763385117600  -1.591949475651989;
   4.870599586419472   0.917898642952955;
  12.284255594066810   0.745921750937965;
  10.086020382496960  -0.065275535967245;
  10.904970755434746   0.168257874021863;
  27.111567609361487   2.147553700262930;
   7.801579868512605  -0.053853687534819;
  17.456573738937045   1.213685322144142;
  16.465212761170250   1.570227475769069;
  32.283885754231719  -0.562786908861260;
  32.240783103024469  -0.521483423534130;
  37.283793294272947   0.725274661950513;
                   0   1.585241612133995;
  28.792571006444312   2.262922193357097;
  31.206319474050421   0.524004841887568;
   3.793033306238173   1.246012487633614;
  20.904785835517202  -0.481164593456334;
  30.559779705941644   1.151284829120261;
  30.344266449905383   1.342257058285061;
   2.155132560362598   1.526300774006596;
  12.413563547688566   0.805231389445003;
  20.516861974651935  -0.358089149453328;
  16.594520714792008   1.535659451569732;
  28.102928587128282   2.356590333525017;
  25.990898677972936   1.531208148025088;
  16.551418063584755   1.547615019963038;
  36.120021711677147  -0.852772524096241;
  29.180494867309580   2.120212197935932;
  12.198050291652306   0.706461935741061;
  26.206411934009193   1.672181394712428;
  12.370460896481314   0.785457131212703;
  42.154392880692420   3.667277701968204;
   9.741199172838943  -0.128125344244015;
  35.688995199604626  -1.259006130978398;
  36.206227014091652  -0.758360004831359;
  40.257876227573334   4.844914568021027;
  22.585789232600028  -0.508806632281886;
  14.223874898393149   1.521855539705895;
  22.542686581392779  -0.519244801101867;
   8.189503729377874  -0.123947990827193;
   8.060195775756117  -0.103312153313277;
  35.602789897190121  -1.326492571117338;
  23.146123698294303  -0.321302262612029;
   8.749838195072149  -0.179028432071300;
  13.318719223040857   1.205217780123329;
   4.741291632797716   0.962022621436576;
  31.594243334915689   0.127259775625189;
  11.767023779579786   0.512688664920914;
  15.473851783403456   1.699277595240155;
  36.163124362884396  -0.806091999354528;
   5.474036703321000   0.701204857816008;
  20.042732811372165  -0.161792074581388;
  24.482305885719114   0.447415764961790;
  20.344451369822927  -0.292012980549053;
   7.973990473341614  -0.088010769256286;
  31.852859242159202  -0.136911303493877;
  28.146031238335532   2.356734914333437;
  32.930425522340499  -1.127220642213802;
   3.232698840543897   1.373352384244791;
  40.775108042060360   4.977172807017508;
   8.836043497486653  -0.182286621962797;
  22.370275976563768  -0.555105961051048;
  38.275154272039742   2.368176442335586;
  30.430471752319885   1.267250936061592;
   8.663632892657645  -0.174343537197052;
   9.956712428875203  -0.091487627630944;
  23.447842256745069  -0.182934093702777;
  39.999260320329824   4.674262806655249;
   1.724106048290079   1.557160664036370;
  34.525223617008827  -1.761732345837659;
  19.396193043263384   0.165532034470817;
  39.568233808257304   4.259409371324105;
  19.223782438434377   0.260423686392464;
  25.344358909864155   1.072838711206962;
  14.999722620123684   1.674300566839079;
  41.335442507754635   4.758343744879022;
  22.715097186221787  -0.473999155524550;
  34.051094453729050  -1.717119612447700;
   2.758569677264126   1.455178821054876;
   0.215513256036260   1.585227581041784;
  15.732467690646967   1.689353942020941;
  22.801302488636289  -0.447916437098178;
  14.310080200807652   1.544994618244313;
  25.689180119522170   1.322277353547662;
  16.982444575657276   1.409380519664032;
  39.309617901013794   3.944635384999555;
  22.930610442258047  -0.404554205444740;
  19.741014252921399  -0.015869736909045;
  42.930240602422955   1.736201732822373;
  38.964796691355772   3.464483275999322;
   6.422295029880543   0.352542384060645;
  25.301256258656903   1.041214484031173;
  24.740921792962627   0.630894939533335;
   6.163679122637031   0.445799477956674;
   4.999907540041228   0.872801188789561;
   8.232606380585125  -0.130193214365214;
  25.387461561071408   1.104398714017575;
  40.042362971537074   4.707093966931643;
   1.465490141046567   1.569083664670142;
  17.284163134108038   1.289632422288408;
   4.224059818310693   1.126568328711114;
  36.594150874956917  -0.283997661753292;
  33.663170592863786  -1.583001959670139;
  18.878961228776362   0.454997213129276;
  31.292524776464926   0.436402565295871;
  10.344636289740471  -0.003681570109308;
  22.671994535014534  -0.486180707543210;
  24.913332397791635   0.756124129910906;
  15.344543829781699   1.697945660963629;
  28.016723284713777   2.353945836302897;
  26.939157004532479   2.074753963662678;
  14.956619968916431   1.669336353148812;
  37.456203899101958   1.001920513565261;
  11.206689313885510   0.279678627346239;
   6.249884425051535   0.414412349990937;
  36.766561479785928  -0.049419660110712;
  33.878683848900046  -1.667773973891511;
  10.430841592154975   0.019467251281452;
   8.792940846279400  -0.180836839058472;
   4.008546562274432   1.188496356668061;
   2.068927257948094   1.533691441611623;
  16.379007458755748   1.591083475085402;
  27.499491470226754   2.274223962121679;
  13.577335130284368   1.307534737531122;
  17.628984343766053   1.132867828355213;
  27.542594121434004   2.284903063793617;
  27.456388819019502   2.262842495764605;
   5.948165866600771   0.525183886818720;
  26.120206631594691   1.616762743132117;
  28.533955099200799   2.322169222117247;
  42.111290229485171   3.748788502980204;
  15.646262388232463   1.694535227574102;
  23.103021047087054  -0.339025577201640;
  11.249791965092763   0.296508476323329;
  41.723366368619899   4.360715688299585;
  37.369998596687452   0.862695691583877;
  19.309987740848879   0.212703036552512;
  25.171948305035148   0.946103704868931;
  24.137484676061099   0.215359251789477;
  22.068557418113006  -0.594935657423699;
  37.025177387029437   0.326023678456776;
   5.818857912979015   0.573195321718105;
  26.421925190045453   1.804244860215354;
  43.102651207251967   1.190000000000000;
  38.792386086526768   3.203852558266191;
  32.758014917511495  -0.988614014252237;
  24.352997932097360   0.358422862336639;
  37.844127759967222   1.644454367348494;
  27.585696772641256   2.294871822302173;
  19.913424857750407  -0.100973371789838;
  32.326988405438975  -0.603727814750614;
  38.576872830490508   2.863532772101336;
  29.051186913687825   2.174860175011677;
  30.387369101112636   1.304994562448186;
  20.646169928273689  -0.403225108073950;
  25.732282770729423   1.352790575311896;
   1.249976885010307   1.575918831856511;
  24.396100583304612   0.387849120735880;
  41.507853112583639   4.607505125151862;
  29.396008123345840   2.013837729654405;
  36.076919060469898  -0.898387849284390;
  25.602974817107668   1.260717608332795;
  31.551140683708439   0.171504155598282;
  29.439110774553093   1.990323063340250;
   0.818950372937787   1.583160549864727;
   2.025824606740843   1.537147875691032;
  19.697911601714146   0.006052376093967;
  20.603067277066440  -0.388617924963639;
  30.214958496283629   1.451012024732063;
  10.948073406641999   0.183446461830033;
   1.939619304326338   1.543597296832023;
  26.335719887630951   1.752600204090232;
   9.008454102315660  -0.184466475682842;
  16.292802156341242   1.610156088700357;
  30.128753193869123   1.520847759448343;
  15.301441178574448   1.696578145750766;
  42.542316741557691   2.811131367230135;
  36.637253526164173  -0.226628571810357;
  11.379099918714518   0.348221264385250;
  10.560149545776731   0.056536022862899;
   6.120576471429779   0.461584082235064;
  36.852766782200426   0.072761472651993;
  16.120391551512235   1.642860315930239;
  11.723921128372535   0.493833231142781;
  32.628706963889734  -0.878407837828490;
  35.473481943568366  -1.418814460031788;
  23.965074071232092   0.106504029419223;
  41.464750461376390   4.649051932387559;
  26.982259655739728   2.093844029786050;
  38.188948969625237   2.224107281339009;
  32.887322871133250  -1.093521399569934;
   8.491222287828638  -0.160764040028010;
  33.145938778376760  -1.285325018050765;
   8.146401078170621  -0.117383529635873;
  13.361821874248109   1.222797089434441;
  25.559872165900416   1.229700699782070;
  13.232513920626353   1.169494255373375;
  14.180772247185896   1.509758568084486;
  38.102743667210738   2.079426782199735;
  21.896146813283998  -0.604539439077637;
  35.775200502019132  -1.186834838759743;
  41.680263717412650   4.415326529365456;
  35.257968687532106  -1.548571968664517;
  19.008269182398116   0.381537862351774;
  35.085558082703102  -1.630430887301428;
  31.508038032501187   0.215755265713483;
  34.654531570630581  -1.749547148497183;
   3.491314747787409   1.318666695212244;
  11.982537035616046   0.608594900610375;
  36.335534967713407  -0.609000913593674;
  37.413101247894708   0.932096804044415;
  39.697541761879059   4.399405501117823;
  18.103113507045826   0.889958535625726;
  16.163494202719487   1.635370553583264;
  30.258061147490878   1.415280065336884;
  32.197680451817220  -0.479838378108010;
  27.197772911775989   2.180285698522726;
   2.241337862777102   1.518254899746052;
   9.223967358351921  -0.178955294457455;
  42.326803485521431   3.313999307542551;
  12.629076803724825   0.903817204186444;
   5.086112842455732   0.842256643469439;
  32.413193707853480  -0.684438038837306;
  41.938879624656160   4.047690089339968;
  36.249329665298902  -0.709590831944978;
   0.344821209658016   1.585157028211455;
  31.378730078879428   0.348345730850928;
   6.594705634709551   0.292214458994388;
   7.198142751611078   0.098993555755779;
  18.922063879983611   0.430471208268646;
   0.043102651207252   1.585241586272723;
  15.215235876159943   1.692469448409858;
  33.059733475962254  -1.224237436500164;
  16.939341924450023   1.425011751810605;
  18.706550623947354   0.553234543722562;
  26.723643748496219   1.970912376726921;
  15.775570341854220   1.686059375142396;
  40.128568273951579   4.767588778789637;
  40.300978878780583   4.866981858057631;
  24.870229746584382   0.724660479569930;
  15.258338527367195   1.694752011685713;
  30.689087659563398   1.031545881234636;
  29.611521379382101   1.889039823354490;
  20.732375230688195  -0.431084270219836;
  38.404462225661497   2.582520797889115;
  36.507945572542411  -0.396065620096976;
  14.525593456843913   1.596404665412428;
   6.206781773844283   0.430073477923001;
  23.577150210366824  -0.116374502987392;
  35.128660733910351  -1.611802661067108;
  10.473944243362228   0.031515057849913;
  25.861590724351178   1.443086426629367;
  24.697819141755375   0.599894545769454;
   3.836135957445425   1.234875186617852;
  37.068280038236686   0.391056335140759;
  29.137392216102327   2.139203709869946;
  17.758292297387808   1.069375100557552;
  33.835581197692790  -1.652827816124914;
  16.853136622035517   1.455106180644232;
  23.921971420024839   0.080162390963894;
  20.215143416201172  -0.238345835503196;
  37.499306550309207   1.072137943352151;
  11.853229081994289   0.550749620174907;
  18.318626763082086   0.772022489168082;
  27.973620633506524   2.351454104048119;
   8.965351451108409  -0.184467332586172;
  19.999630160164912  -0.141826493735912;
   7.758477217305353  -0.044600073372695;
  40.645800088438605   4.972284543811988;
  38.663078132905014   3.001339563927399;
  32.973528173547756  -1.160252495365627;
  21.766838859662244  -0.605498498134946;
  14.568696108051164   1.605536981477396;
  36.982074735822188   0.261653751928160;
  24.439203234511865   0.417517658307729;
  25.904693375558431   1.472721409323360;
   2.974082933300386   1.420925928311185;
   0.862053024145039   1.582738737865653;
  42.240598183106925   3.496088586358256;
  41.378545158961884   4.724454549476876;
  33.921786500107295  -1.681688931124613;
  13.404924525455360   1.240176866175079;
  36.378637618920656  -0.557211541331274;
  17.887600251009566   1.003676789985265;
   2.456851118813362   1.495142709373109;
  39.525131157050055   4.210046046013838;
  37.671717155138218   1.356353119201983;
   5.258523447284739   0.780191555672892;
  16.422110109962997   1.580876794286794;
   0.172410604829008   1.585235690787279;
  11.810126430787038   0.531663466789855;
  37.930333062381727   1.789331042132074;
  25.085743002620642   0.882644605678821;
  28.059825935921030   2.355659332597985;
  21.637530906040485  -0.601161144364291;
  34.482120965801570  -1.763423543980540;
   6.379192378673291   0.367881087019089;
  27.025362306946981   2.112347981757789;
  17.197957831693532   1.325625655277142;
   7.413656007647337   0.038959267177116;
  31.077011520428666   0.654215658303151;
  20.430656672237433  -0.325864198793780;
  41.249237205340130   4.818586791533181;
  22.327173325356519  -0.562588359242038;
  26.508130492459959   1.854188322266225;
  24.999537700206140   0.819279701395451;
  29.827034635418361   1.746825391950548;
   3.965443911067181   1.200361547285523;
  14.784209364087424   1.645160884372588;
   0.258615907243512   1.585213341787201;
  18.361729414289336   0.748040873440236;
  15.818672993061471   1.682295552751658;
   5.129215493662984   0.826854887920153;
  34.870044826666842  -1.705207379000528;
  22.887507791050794  -0.419567505116260;
  37.197587991858448   0.589879918099082;
   3.103390886922142   1.398027855640764;
  32.844220219925994  -1.059174148960776;
  13.146308618211849   1.133074232561478;
  11.465305221129023   0.383645856378442;
   7.715374566098101  -0.035070089101325;
  34.913147477874091  -1.692697101824734;
  19.784116904128652  -0.037544033364762;
   1.077566280181299   1.579701536392732;
  27.930517982299271   2.348188726548274;
  14.051464293564141   1.471435600761135;
  41.033723949303869   4.926149057967384;
   9.267070009559172  -0.176746825204639;
   3.879238608652677   1.223553003727708;
  31.421832730086681   0.304196259485807;
  12.154947640445053   0.686781995351521;
  28.835673657651565   2.250234259005264;
  22.154762720527511  -0.586546903934926;
  41.594058414998145   4.516642606407932;
  25.516769514693163   1.198545530765391;
  30.904600915599659   0.824807516539575;
   8.405016985414132  -0.151910287192438;
  25.258153607449650   1.009540776136344;
  34.740736873045080  -1.735439348662402;
  11.896331733201542   0.569939032280457;
  32.499399010267979  -0.763446983210254;
  32.801117568718745  -1.024198446638068;
  16.206596853926740   1.627421758150186;
  18.663447972740101   0.577771319842811;
  18.749653275154603   0.528677604922015;
  37.542409201516463   1.142719805622382;
  35.904508455640887  -1.069942302344843;
   2.801672328471378   1.448715429262448;
  37.111382689443943   0.456726882676461;
  34.956250129081340  -1.678965923325187;
  18.835858577569109   0.479547760801390;
   2.930980282093134   1.428165584909350;
  38.706180784112263   3.069440329091337;
  22.499583930185526  -0.529096095955296;
   8.361914334206881  -0.146977425594843;
  18.620345321532849   0.602276858640537;
  17.413471087729793   1.233148458515111;
  21.853044162076745  -0.605451238268450;
  12.585974152517574   0.884167494087772;
   3.146493538129393   1.390000542750420;
   8.103298426963370  -0.110503616041662;
  35.559687245982872  -1.358460596194085;
   4.956804888833976   0.887934296942545;
  10.603252196983982   0.069500151339748;
  10.517046894569479   0.043872795001448;
  28.577057750408052   2.314309494004682;
  13.965258991149636   1.444260911394034;
  10.861868104227495   0.153328251866345;
   0.905155675352291   1.582260347001576;
   6.767116239538558   0.233831813582401;
  10.818765453020243   0.138663327564475;
  21.292709696382470  -0.564317386785689;
  31.809756590951949  -0.093140749007479;
  10.732560150605739   0.110149817914188;
  31.464935381293934   0.259992722950654;
  41.076826600511119   4.909473277997496;
   4.180957167103441   1.139292465739591;
   8.448119636621385  -0.156506835266689;
   3.534417398994661   1.308865237715235;
  28.447749796786297   2.335469241775079;
  27.154670260568736   2.164234108780075;
  29.956342589040116   1.653639301256667;
   9.310172660766424  -0.174168729897524;
  11.163586662678259   0.263063984810596;
  26.852951702117974   2.034860635532670;
   7.068834797989322   0.137542376053568;
  38.835488737734018   3.270090101927904;
  22.456481278978274  -0.538358101765808;
  38.361359574454248   2.511354431163002;
   8.318811682999629  -0.141711411553439;
  20.258246067408422  -0.256607859551498;
  21.723736208454991  -0.604638047145606;
   5.861960564186267   0.557174076110819;
   3.017185584507637   1.413490131637086;
  27.413286167812249   2.250766924829556;
  38.533770179283259   2.793900004169310;
  19.180679787227124   0.284461967414796;
  19.956527508957659  -0.121550175967085;
  39.266515249806538   3.888091974162492;
  34.999352780288596  -1.664011970399876;
   7.499861310061842   0.016552368697889;
  35.645892548397377  -1.293338774404100;
  39.482028505842798   4.159394263967138;
  14.611798759258416   1.614273422880129;
   3.362006794165653   1.346896405275118;
  35.301071338739362  -1.525050882875790;
  31.939064544573707  -0.223975610930693;
  33.490759988034775  -1.497802348914085;
  22.973713093465296  -0.388988088977649;
  30.861498264392406   0.866792555729101;
   3.318904142958401   1.355912685520452;
  36.895869433407682   0.134999027948204;
  12.499768850103070   0.844749234381112;
  32.154577800609964  -0.437872826398673;
  21.551325603625983  -0.595362102282424;
  27.283978214190494   2.210462307292170;
  19.094474484812618   0.332837973552171;
  23.275431651916062  -0.265011680144755;
  15.861775644268723   1.678062759442831;
   5.301626098491991   0.764501525492996;
  30.990806218014164   0.740005482228173;
  32.068372498195458  -0.353064536445082;
  12.715282106139329   0.942953533681158;
  19.827219555335905  -0.058959807064747;
  40.990621298096620   4.940450511186802;
   4.482675725554205   1.046890391143451;
  34.826942175459585  -1.716499150701832;
   2.370645816398858   1.504913096545679;
  34.783839524252336  -1.726575331196332;
   2.413748467606110   1.500116944955736;
  34.439018314594321  -1.763940550793428;
  21.939249464491251  -0.603033236985438;
   9.913609777667952  -0.099526335504858;
  13.103205967004596   1.114624488727638;
  25.646077468314918   1.291581431425811;
  15.387646480988952   1.698852566946270;
  11.939434384408795   0.589223537456488;
  12.672179454932078   0.923415503055371;
  23.835766117610337   0.028601384732981;
  39.007899342563029   3.527717183950859;
  32.714912266304239  -0.952440729506463;
  13.706643083906124   1.355556129304508;
   1.422387489839315   1.570658711430053;
  40.344081529987839   4.887141972267131;
  10.689457499398488   0.096312007642517;
   1.637900745875575   1.561630267950753;
  20.473759323444682  -0.342184386078527;
   7.586066612476346  -0.004870901450743;
  26.163309282801944   1.644643326155136;
  15.129030573745439   1.686544779217882;
  35.990713758055392  -0.986370799763118;
  41.766469019827156   4.303453780934794;
  13.879053688735132   1.415850529746730;
  38.318256923246999   2.439894467163684;
  17.241060482900785   1.307800161019507;
  40.171670925158828   4.795185734468472;
  38.490667528076003   2.723829600063609;
   6.680910937124055   0.262754864707864;
  11.034278709056503   0.214576936644053;
  38.059641016003482   2.006943660468614;
   3.706828003823669   1.267725626013618;
  42.671624695179446   2.476888798370811;
   0.603437116901527   1.584557402868452;
  33.318349383205771  -1.398220514439065;
  39.740644413086308   4.443252766421275;
  42.628522043972190   2.590999280993516;
  17.973805553424068   0.958774968992591;
  10.042917731289707  -0.074359597863424;
   4.568881027968708   1.019139293850261;
  15.689365039439714   1.692179180266647;
  37.757922457552723   1.500042817727345;
   5.646447308150007   0.637314262408643;
  12.068742338030550   0.647564934044394;
  28.706365704029807   2.285891801490635;
  16.896239273242770   1.440255539401668;
   2.499953770020614   1.489988354340285;
  28.275339191957290   2.352415975111561;
  13.275616571833606   1.187447346602097;
  34.352813012179816  -1.761481882391276;
   6.896424193160314   0.191562225663342;
  14.698004061672920   1.630538439417343;
  23.534047559159571  -0.139021030274682;
   5.172318144870236   0.811373407269744;
   2.672364374849622   1.467532644865235;
   6.551602983502298   0.307129790357674;
  32.111475149402715  -0.395607847470699;
   4.353367771932448   1.087424952380660;
  31.766653939744696  -0.049239214843060;
   0.646539768108779   1.584360208754910;
  16.077288900304982   1.649889056388397;
   1.293079536217559   1.574752108100915;
  18.447934716703841   0.699767010942433;
  14.094566944771392   1.484541960364336;
  13.835951037527881   1.401199987614032;
  31.982167195780956  -0.267227323992313;
  34.697634221837831  -1.743095140504916;
  38.921694040148523   3.400442637587132;
   4.267162469517944   1.113680387761293;
  20.128938113786667  -0.200750558922390;
  24.223689978475605   0.271722458418300;
  16.335904807548495   1.600844256778603;
  21.809941510869493  -0.605770286602483;
  33.189041429584016  -1.314735965772607;
   1.163771582595803   1.577979110812023;
  19.870322206543154  -0.080106432874818;
  43.016445904837461   1.468260270003445;
  28.878776308858818   2.236746972600971;
  21.508222952418731  -0.591599922068051;
  13.792848386320628   1.386262383092662;
  21.120299091553463  -0.532600899543985;
   0.560334465694276   1.584720977577540;
  23.404739605537817  -0.204183935952737;
   1.896516653119086   1.546596269869982;
  39.956157669122568   4.639754144481931;
  15.172133224952692   1.689732843193485;
  36.421740270127913  -0.504447732278258;
   7.111937449196574   0.124495603733450;
  36.464842921335162  -0.450726553721625;
  10.775662801812992   0.124268697033936;
  28.404647145579045   2.340910741054747;
  41.895776973448910   4.115656888446882;
  14.870414666501928   1.658104633738197;
   3.275801491751149   1.364731428698806;
   0.387923860865268   1.585109633206135;
   5.991268517808023   0.509227133857655;
  35.732097850811876  -1.223502132627667;
  29.568418728174848   1.915428199074894;
  42.456111439143186   3.020433715564504;
  30.775292961977904   0.949841466653328;
  24.008176722439345   0.133205547830959;
  13.749745735113377   1.371045226591387;
  10.991176057849250   0.198888148871671;
  22.628891883807281  -0.497784279512509;
  29.008084262480573   2.191516005647771;
  42.887137951215706   1.866261269250235;
  20.559964625859187  -0.373569828406037;
  28.189133889542784   2.356089488151179;
  24.525408536926367   0.477530577363710;
   6.939526844367566   0.177794391622073;
  42.757829997593952   2.240621244615852;
   8.706735543864896  -0.176863312370986;
  24.180587327268352   0.243389176903390;
  17.068649878071778   1.376979492397946;
  39.395823203428293   4.054371638167385;
   1.336182187424811   1.573489098801505;
   6.637808285916803   0.277420723685448;
  26.637438446081713   1.925681822693686;
  34.395915663387065  -1.763290722837270;
   2.586159072435118   1.479131657184106;
   6.724013588331307   0.248223146317348;
   0.431026512072520   1.585045528547242;
  24.568511188133620   0.507849084099214;
  21.163401742760716  -0.541333762888955;
  29.266700169724082   2.079928210514907;
  29.783931984211108   1.776605725178676;
  38.016538364796233   1.934410836135054;
   8.017093124548865  -0.095813160351473;
  33.533862639242031  -1.520490700873471;
  35.818303153226381  -1.149012876946282;
  40.861313344474866   4.969343042263668;
   9.784301824046196  -0.121513085254291;
  32.025269846988209  -0.310263995346323;
   3.060288235714889   1.405857599598842;
  14.439388154429409   1.576973616995390;
  24.611613839340873   0.538358130922965;
  27.887415331092022   2.344154622343733;
  17.801394948595060   1.047708671253332;
  31.335627427672179   0.392421124002504;
  16.508315412377502   1.559138990861658;
  23.663355512781330  -0.069744989259209;
  33.706273244071035  -1.601936627414191;
  25.128845653827895   0.914369621731027;
  27.801210028677517   2.333801525341044;
  11.077381360263756   0.230506696764274;
  23.016815744672549  -0.372874296043828;
  20.172040764993920  -0.219723511609090;
  20.990991137931708  -0.503268411090718;
  32.456296359060730  -0.724165574226172;
   9.180864707144668  -0.180794356844876;
  13.448027176662613   1.257348764104867;
  40.214773576366085   4.820971824197573;
  21.680633557247738  -0.603191366243593;
  28.749468355237060   2.274808631997387;
  39.180309947392033   3.771839989893844;
   8.879146148693904  -0.183376016832382;
  42.025084927070665   3.903658221358933;
  22.284070674149266  -0.569474557386462;
  39.913055017915319   4.603602113108239;
  16.034186249097729   1.656454999502199;
   9.611891219217188  -0.145787893197697;
   4.698188981590464   0.976493840708650;
  36.723458828578671  -0.109319010777343;
  31.723551288537447  -0.005227599104466;
   0.948258326559543   1.581721415729378;
  35.344173989946611  -1.500311315301094;
  37.585511852723712   1.213636409851829;
  30.516677054734391   1.190380630143369;
  18.060010855838573   0.913079506734972;
  37.326895945480203   0.793745633935610;
  29.094289564895075   2.157421284681439;
  29.870137286625610   1.716396896514605;
  17.715189646180558   1.090796371965832;
   4.310265120725196   1.100631578600652;
  17.844497599802313   1.025806162784479;
  34.007991802521801  -1.706374063279878;
  27.628799423848509   2.304122545556317;
  41.852674322241654   4.180934033290371;
  35.947611106848136  -1.028713787398033;
  15.042825271330935   1.678825576386009;
  33.576965290449280  -1.542263811315684;
  19.611706299299644   0.050596851996996;
   8.922248799901157  -0.184103408616894;
  30.301163798698131   1.379023701346055;
  30.042547891454618   1.588424090982530;
  38.447564876868753   2.653357829821770;
  15.904878295475974   1.673361491848624;
  22.413378627771021  -0.547028678483913;
  16.810033970828265   1.469558168779226;
  40.473389483609594   4.935868115082341;
  30.473574403527138   1.229041192297847;
  33.447657336827525  -1.474214731642507;
  42.283700834314175   3.406406764036424;
   4.439573074346952   1.060551023964098;
  27.327080865397747   2.224567888535107;
  14.353182852014903   1.556024255494990;
   8.577427590243142  -0.168248969005329;
  34.180402407350805  -1.742828792839122;
   7.155040100403826   0.111644037163126;
  41.981982275863416   3.977026093566697;
  10.387738940947724   0.007733663537167;
  20.861683184309950  -0.469367958897203;
  21.378914998796976  -0.576907776413996;
   3.189596189336645   1.381775424203800;
  24.266792629682858   0.300347226822642;
  21.034093789138957  -0.513562106552676;
  35.430379292361117  -1.447189273483072;
  20.775477881895448  -0.444320460345026;
   1.853414001911834   1.549448872353934;
   1.379284838632063   1.572125917573292;
  23.232329000708809  -0.284288723416634;
  24.956435048998888   0.787668600701522;
  30.085650542661870   1.554924828988113;
  33.404554685620269  -1.449744126358111;
  18.491037367911094   0.675496088934177;
  21.077196440346210  -0.523341677446547;
  21.206504393967965  -0.549534475247725;
  21.422017650004225  -0.582368701244967;
   4.396470423139700   1.074063674602616;
  28.663263052822558   2.296170297720170;
  22.844405139843541  -0.434023116292513;
  23.059918395879802  -0.356218234282580;
  37.973435713588984   1.861862122209208;
  16.637623365999257   1.523276381208545;
   5.689549959357259   0.621291335746719;
   2.284440513984354   1.513979790651124;
  41.119929251718375   4.890400685716252;
   5.430934052113748   0.717098649984643;
  40.688902739645854   4.976096066572098;
  11.637715825958031   0.456512133182079;
  17.542779041351551   1.173853268480440;
   3.749930655030921   1.256963171464436;
  32.585604312682484  -0.840588682253128;
  21.594428254833232  -0.598550324659537;
  17.930702902216819   0.981329900095683;
  28.921878960066067   2.222462848775832;
   0.991360977766795   1.581117964738851;
  13.060103315797345   1.096026454656678;
  36.551048223749667  -0.340483089796114;
   5.732652610564512   0.605259925807221;
  29.740829333003855   1.805727354639272;
  26.551233143667211   1.878488785953002;
  11.292894616300014   0.313546789356036;
  39.654439110671809   4.354125240479284;
  10.129123033704211  -0.055848552351157;
  29.223597518516833   2.100451868019311;
  27.758107377470264   2.327493975662583;
  24.309895280890107   0.329251434879147;
  34.309710360972566  -1.758522311301879;
   6.034371169015275   0.493304126374564;
  23.620252861574077  -0.093279508293641;
  24.654716490548125   0.569044426090246;
  23.361636954330564  -0.224951928678415;
  42.714727346386695   2.360092958744629;
   1.206874233803055   1.576993185805075;
  43.059548556044710   1.330411108411132;
  37.887230411174478   1.716850819399471;
   9.137762055937417  -0.182264390781631;
  21.335812347589723  -0.570889119956795;
  39.137207296184783   3.712205771783829;
  41.163031902925624   4.868909431442020;
  27.671902075055762   2.312647832505798;
  17.585881692558800   1.153500568633276;
  20.818580533102701  -0.457084167530208;
  17.327265785315291   1.271129624080521;
  10.646354848191235   0.082760441601672;
  14.396285503222156   1.566685880600579;
  25.947796026765683   1.502100170502364;
  28.361544494371792   2.345547970959792;
  42.844035300008450   1.993693309876969;
   4.913702237626724   0.902968320947984;
   7.629169263683598  -0.015200513452030;
  36.680356177371422  -0.168395588861426;
  20.947888486724455  -0.492467026028048;
  21.249607045175217  -0.557197465473751;
  31.120114171635919   0.610996656265938;
  23.878868768817590   0.054191342151783;
  38.619975481697757   2.932691480309063;
   0.301718558450764   1.585190674422281;
  32.671809615096990  -0.915698616794862;
  29.999445240247368   1.621332991012308;
  40.559594786024100   4.958253369042428;
  18.275524111874834   0.795886479861932;
  31.249422125257674   0.480270328362515;
   9.698096521631692  -0.134376250361284;
  10.258430987325967  -0.025541206334042;
  37.240690643065697   0.657310371917083;
  20.387554021030180  -0.309137406211291;
  13.620437781491621   1.323793038559477;
  23.490944907952322  -0.161210383155523;
  19.439295694470637   0.142180720446514;
   1.551695443461071   1.565594995206048;
   0.129307953621756   1.585239678912192;
   6.508500332295046   0.322160424639495;
  12.111844989237802   0.667146818237450;
   0.474129163279772   1.584961586971401;
  39.611336459464553   4.307447846231474;
  12.542871501310321   0.864475223787039;
  28.490852447993550   2.329222330198210;
  40.818210693267609   4.974384324338186;
  10.172225684911464  -0.046081680520322;
  33.361452034413020  -1.424407102803255;
  40.732005390853104   4.977734526674204;
  22.240968022942013  -0.575763513969447;
  39.094104644977534   3.651615715437522;
  42.499214090350435   2.917139100014331;
  31.895961893366454  -0.180529924424959;
   6.853321541953062   0.205495170410100;
  22.111660069320259  -0.591040619796789;
   3.577520050201913   1.298869347357843;
  31.680448637330194   0.038873264592078;
  15.603159737025210   1.696422431702419;
   7.370553356440086   0.050518122288854;
  37.154485340651192   0.523010005474353;
  33.016630824755005  -1.192597761526361;
  16.680726017206510   1.510470110272186;
  20.085835462579414  -0.181436774099605;
  25.042640351413393   0.850943155312134;
  38.145846318417988   2.151826109284781;
   7.456758658854590   0.027635536445991;
  34.611428919423325  -1.754800313751580;
   2.715467026056874   1.461450797254073;
  32.370091056646224  -0.644285165600852;
  40.387184181195089   4.905363588176306;
   9.482583265595432  -0.160161319834627;
   2.629261723642370   1.473425762127551;
   9.439480614388181  -0.164216900372143;
  34.266607709765310  -1.754420744683142;
  33.792478546485540  -1.636863723775939;
  14.741106712880171   1.638057305524309;
  11.680818477165282   0.475105102489380;
  41.809571671034405   4.243529918585488;
  39.438925854635549   4.107490568386961;
   3.405109445372905   1.337682961554372;
   4.611983679175960   1.005056158841461;
   4.784394284004968   0.947430175322767;
  26.766746399703472   1.992760368606699;
  29.654624030589350   1.861954072779911;
  21.465120301211478  -0.587267476111571;
  25.775385421936676   1.383106320126704;
   4.655086330383212   0.990839697721705;
  14.008361642356888   1.458006267278074;
  39.783747064293564   4.485631379820147;
  34.094197104936306  -1.726784724676482;
  22.025454766905753  -0.598232335914673;
   5.215420796077487   0.795817252717127;
  19.568603648092392   0.073197442855542;
  39.352720552221044   4.000074274080511;
  33.749375895278291  -1.619895330038835;
   3.922341259859929   1.212047797106868;
  13.922156339942385   1.430206603582550;
  39.051001993770278   3.590107091576716;
   6.982629495574818   0.164197769917626;
  15.991083597890478   1.662556583262866;
   1.594798094668323   1.563673960486833;
   2.887877630885882   1.435209814576168;
   4.525778376761457   1.033085277522822;
  26.680541097288966   1.948548724242111;
  27.240875562983241   2.195698379493715;
  28.318441843164539   2.349382431018710;
  24.784024444169880   0.662031935926834;
  26.809849050910721   2.014080469329682;
  34.223505058558061  -1.749186364471669;
  31.637345986122941   0.083042615762289;
  29.697726681796603   1.834180085563816;
  29.482213425760342   1.966078060453054;
  13.017000664590093   1.077288827514107;
  18.577242670325596   0.626740135849412;
  33.102836127169510  -1.255152718638742;
   9.827404475253449  -0.114541205960595;
  33.232144080791265  -1.343367422896468;
  26.034001329180185   1.560030842788422;
  16.249699505133989   1.619016131584973;
  35.042455431495846  -1.647833896841540;
  25.430564212278657   1.135879718954815;
  26.077103980387438   1.588553825447572;
  13.189411269419102   1.151367027091581;
   7.930887822134362  -0.079909222849093;
   2.327543165191606   1.509533300171438;
  15.085927922538188   1.682908033775037;
  38.878591388941274   3.335632511817851;
  13.663540432698873   1.339802799463844;
  42.800932648801201   2.118484174028368;
  19.353090392056131   0.189043208513233;
  19.654808950506897   0.028211523435473;
   2.844774979678629   1.442059447371199;
  41.206134554132881   4.844978313713763;
  28.232236540750037   2.354650809072559;
  26.896054353325226   2.055089017183274;
  23.189226349501556  -0.303054490940032;
   6.465397681087794   0.337300059002835;
  19.051371833605369   0.357153086428136;
   0.517231814487024   1.584854536177014;
  36.809664130993177   0.011281120417909;
   2.112029909155346   1.530076669875545;
  30.818395613185153   0.908476411390669;
  23.706458163988579  -0.045780121893074;
  40.516492134816843   4.948090501867642;
  42.585419392764940   2.702415950368286;
   5.905063215393519   0.541168238701740;
  42.197495531899676   3.583045134811197;
   5.344728749699244   0.748752447165653;
  12.801487408553834   0.981813356004875;
  27.370183516604996   2.238005786191974;
  41.421647810169141   4.688029631527942;
  15.516954434610707   1.698792746634156;
  26.594335794874461   1.902324258360045;
  37.801025108759973   1.572174279109677;
  12.973898013382842   1.058420338537643;
   0.689642419316031   1.584125710124187;
  19.482398345677886   0.119000437463047;
  10.215328336118716  -0.035978114159642;
  12.930795362175589   1.039429749008843;
  18.404832065496588   0.723952172969706];
    exact = sortrows(exact,1);
    xexact = exact(:,1);
    uexact = exact(:,2);


end

function[xhat] = Buildxhat(type,L,nnp)

    if (type == 0)
        xhat = linspace(0,L,nnp);
    else
        used = zeros(nnp,1);
        nums = round(nnp.*rand(nnp*100,1));
        i = 1;
        j = 0;
        h = L/(nnp-1);
        while (1)
            nodenum = nums(i);
            if (nodenum == 0)
                nodenum = 1;
            end
            i = i+1;
            if (used(nodenum)== 1)
                continue;
            end
            used(nodenum) = 1;
            xhat(nodenum) = j*h;
            j = j+1;
            if (j == nnp)
                break;
            end
        end
    end
end


