Polynomial Extraction and Derivatives Task to be done: 1. Write a MATLAB program for polynomial fitting and plot the first derivative and second derivative 2. A excel .xlsx file is provided for...

1 answer below »
Please follow the instruction in the PDF, and use the data in the .xlsx file for this work


Polynomial Extraction and Derivatives Task to be done: 1. Write a MATLAB program for polynomial fitting and plot the first derivative and second derivative 2. A excel .xlsx file is provided for plotting, the first row will be the data for X-axis and the second raw will be the data for Y-axis 3. Please plot the curves for fitted results (X: from -6 to 2, with a step size of 0.01) and actual results together as shown below 4. Please extract the fitted curve equation, example shown below (set the order to 20) y = (0.4) + (-0.2) x + (-0.3) x^2 + (2.8)x^3 + (0.9)x^4 + (-24.2)x^5 + (-0.1)x^6 + (92.2)x^7 + (-12.1)x^8 +(-181.0)x^9 + (31.3)x^10 +(204.0)x^11 +(-35.2)x^12 + (- 137.6)x^13 +(20.6)x^14 +(55.0)x^15 +(-6.1)x^16 +(-12.0)x^17 +(0.7)x^18 +(1.1)x^19 5. Next, please extract the first derivative of the extracted equation from step 4, example shown below: y’ = (-0.2) + (-0.6) x + (8.4)x^2 + (3.6)x^3 + (-121.0)x^4 + …. 6. Plot the extracted first derivative (y’) with the X value (-6 to 2, step: 0.01) 7. Next, please extract the second derivative of the extracted equation from step 4, example shown below: y’’ = (-0.6) + (16.8)x + (10.8)x^2 + (-484.0)x^3 + …. 8. Plot the extracted second derivative (y’’) with the X value (-6 to 2, step: 0.01) 9. Generate an excel file with the data (x, y, y’,y’’) included.
Answered Same DayMay 19, 2021

Answer To: Polynomial Extraction and Derivatives Task to be done: 1. Write a MATLAB program for polynomial...

Avinash Kumar answered on May 19 2021
153 Votes
Sheet1
    x    y    y'    y''
    -6    -10804.5152402244    95706.8438443589    -740624.034253006
    -5.99    -9883.6461937046    88548.8877953759    -691467.922528071
    -5.98    -9031.9483030604    81867.7400593636    -645235.671854782
    -5.97    -8244.7970365896    75634.950117062    -601770.944652834
    -5.96    -7517.8446853479    69823.5929363721    -560924.926966012
    -5.95    -6847.0054650724    64408.1953627746    -522556.002658472
    -5.94    -6228.4413636304    59364.66574072    -486529.440348316
    -5.93    -5658.548655451    54670.2265426267    -452717.09245893
    -5.92    -5133.9450896129    50303.350017686    -420997.106257916
    -5.91    -4651.4577039852    46243.6966358511    -391253.646084714
    -5.9    -4208.1112317575    42472.0562396577    -363376.626662025
    -5.89    -3801.1171039115    38970.2918532733    -337261.45703926
    -5.88    -3427.8629751703    35721.2859655068    -312808.794682625
    -5.87    -3085.9027902264    32708.8892341363    -289924.309429031
    -5.86    -2772.9473577458    29917.871507823    -268518.457051449
    -5.85    -2486.8553820577    27333.8750536735    -248506.261803445
    -5.84    -2225.6249727054    24943.3699295817    -229807.107941747
    -5.83    -1987.3855768811    22733.6113851244    -212344.53970361
    -5.82    -1770.3903346413    20692.5992314325    -196046.069512744
    -5.81    -1573.0088266329    1
8809.039080511    -180842.994010493
    -5.8    -1393.7202024362    17072.3053985653    -166670.217826916
    -5.79    -1231.1066701494    15472.4062771151    -153466.084509643
    -5.78    -1083.8473313033    13999.949844344    -141172.214724747
    -5.77    -950.7123373246    12646.1122919039    -129733.351032455
    -5.76    -830.557366381    11402.6073951772    -119097.209387867
    -5.75    -722.3183930374    10261.6575088233    -109214.336795406
    -5.74    -625.0067392616    9215.9659086091    -100037.97514766
    -5.73    -537.7044015391    8258.6905519951    -91523.9307956435
    -5.72    -459.5596271873    7383.4190074255    -83630.4497855762
    -5.71    -389.7827391016    6584.144701916    -76318.0984408812
    -5.7    -327.6421934358    5855.2442633198    -69549.6492054046
    -5.69    -272.4608511848    5191.4560332412    -63289.9713922267
    -5.68    -223.6124691504    4587.8596016823    -57505.9267735952
    -5.67    -180.5183821116    4039.8564057666    -52166.2697793079
    -5.66    -142.644379644    3543.1512653757    -47241.5521021528
    -5.65    -109.4977577754    3093.7348842903    -42704.0315483453
    -5.64    -80.6245475755    2687.8672248144    -38527.5850231526
    -5.63    -55.6068992429    2322.0617242719    -34687.6253951975
    -5.62    -34.0606247077    1993.070350604    -31161.0221317816
    -5.61    -15.6328813416    1697.8694050418    -27926.0255751611
    -5.6    0.0000009729    1433.6460911633    -24962.1946543103
    -5.59    13.134563315    1197.7857605729    -22250.3279767279
    -5.58    24.0421440978    987.8598653426    -19772.3980613898
    -5.57    32.9706773165    801.6145150216    -17511.488676012
    -5.56    40.1463859097    636.9596838855    -15451.7350905409
    -5.55    45.7753688807    491.9589651953    -13578.2671655457
    -5.54    50.045088977    364.8199180693    -11877.1551282954
    -5.53    53.1257668264    253.8849062665    -10335.3579450286
    -5.52    55.1716828922    157.6224702942    -8940.674156095
    -5.51    56.3224009545    74.6191567388    -7681.6951284284
    -5.5    56.7039077849    3.5718307981    -6547.7605273983
    -5.49    56.429679827    -56.7196121281    -5528.9160011887
    -5.48    55.6016790092    -107.3590909439    -4615.8729464002
    -5.47    54.3112812948    -149.3608062619    -3799.9702702547
    -5.46    52.640144583    -183.6553375149    -3073.1380269347
    -5.45    50.6610149879    -211.0953667385    -2427.8629415844
    -5.44    48.4384773211    -232.4610989792    -1857.1556181636
    -5.43    46.0296574343    -248.4653317757    -1354.519457789
    -5.42    43.4848689006    -259.7582338113    -913.9211450549
    -5.41    40.8482179344    -266.9318419509    -529.7626766554
    -5.4    38.1581635962    -270.5242794864    -196.8548280004
    -5.39    35.4480371518    -271.0237157426    89.6079731721
    -5.38    32.7465212416    -268.8720804437    334.0714601543
    -5.37    30.0780972263    -264.4685542241    540.6440824867
    -5.36    27.4634536483    -258.1728274196    713.118320602
    -5.35    24.9198670108    -250.3081624145    854.9908851894
    -5.34    22.4615511534    -241.1642524966    969.4818065934
    -5.33    20.0999802391    -230.9999004398    1059.5524634589
    -5.32    17.8441836225    -220.0455135048    1127.9226358352
    -5.31    15.7010194685    -208.5054449503    1177.0865916167
    -5.3    13.6754230301    -196.5601679732    1209.3282860775
    -5.29    11.7706358318    -184.3683066339    1226.7356810942
    -5.28    9.9884145703    -172.0685313304    1231.2142546569
    -5.27    8.329221479    -159.7813144102    1224.4997371642
    -5.26    6.7923983249    -147.6105708748    1208.1700960054
    -5.25    5.3763241118    -135.6451763919    1183.6568219331
    -5.24    4.0785581377    -123.9603807048    1152.2555462576
    -5.23    2.8959702486    -112.6191135513    1115.1360216531
    -5.22    1.8248569372    -101.6731976031    1073.3514992787
    -5.21    0.8610479735    -91.1644704425    1027.8475342729
    -5.2    -0.0000001668    -81.1258149118    979.4702484004
    -5.19    -0.7631190224    -71.5821192004    928.9740771483
    -5.18    -1.4333524249    -62.551154025    877.0290280824
    -5.17    -2.0158900884    -54.0443854638    824.2274840109
    -5.16    -2.5160076728    -46.0677151637    771.0905556898
    -5.15    -2.9390151947    -38.6221664572    718.0740291566
    -5.14    -3.2902110494    -31.7045073605    665.573922281
    -5.13    -3.5748423258    -25.3078229987    613.9316664656
    -5.12    -3.79807082    -19.4220368025    563.4389383719
    -5.11    -3.9649438115    -14.0343864492    514.3421655203
    -5.1    -4.0803691006    -9.1298518502    466.8467135451
    -5.09    -4.1490950642    -4.6915501707    421.1207831929
    -5.08    -4.175693025    -0.7010856915    377.2990314933
    -5.07    -4.1645443406    2.8611289805    335.4859233255
    -5.06    -4.1198297773    6.0155890152    295.7588438733
    -5.05    -4.0455214012    8.7834390263    258.1709801121
    -5.04    -3.9453778262    11.1862467929    222.7539776879
    -5.03    -3.8229406227    13.2457985478    189.5203973398
    -5.02    -3.6815332804    14.9839202628    158.4659759926
    -5.01    -3.5242612741    16.4223200644    129.5717131274
    -5    -3.3540143445    17.5824501314    102.8057798387
    -4.99    -3.1734695177    18.4853880483    78.1252745478
    -4.98    -2.9850951657    19.1517334744    55.4778278208
    -4.97    -2.7911566384    19.6015210828    34.8030711675
    -4.96    -2.5937219251    19.8541476435    16.033968487
    -4.95    -2.3946684684    19.9283114104    -0.9019637878
    -4.94    -2.1956906063    19.8419632594    -16.0815559898
    -4.93    -1.998306955    19.6122679438    -29.5849910474
    -4.92    -1.8038684927    19.2555753343    -41.4949018292
    -4.91    -1.613566965    18.7874006852    -51.895568804
    -4.9    -1.4284431295    18.2224107392    -60.872193517
    -4.89    -1.2493953304    17.5744186293    -68.5102566039
    -4.88    -1.0771881396    16.8563833712    -74.8949473915
    -4.87    -0.9124606742    16.0804161648    -80.1106584362
    -4.86    -0.7557352588    15.2577895399    -84.2405457085
    -4.85    -0.6074255023    14.3989525498    -87.3661441126
    -4.84    -0.4678446528    13.513548769    -89.5670347284
    -4.83    -0.3372134805    12.6104361449    -90.9205635765
    -4.82    -0.2156679058    11.6977121043    -91.5016045352
    -4.81    -0.1032666545    10.7827381217    -91.382356459
    -4.8    0.0000016206    9.8721677064    -90.6321896533
    -4.79    0.094211386    8.9719756862    -89.3175129288
    -4.78    0.1794935529    8.0874876678    -87.5016818079
    -4.77    0.2560292439    7.2234115073    -85.2449291163
    -4.76    0.3240436058    6.383868244    -82.6043209235
    -4.75    0.3838003037    5.5724245397    -79.6337385612
    -4.74    0.4355959709    4.7921241166    -76.3838762353
    -4.73    0.4797551681    4.0455192186    -72.9022602004
    -4.72    0.5166256756    3.3347030524    -69.2332820273
    -4.71    0.5465741186    2.6613400393    -65.4182475541
    -4.7    0.5699816089    2.0266970355    -61.4954361953
    -4.69    0.5872401541    1.4316725343    -57.5001727321
    -4.68    0.5987490062    0.8768266254    -53.4649082457
    -4.67    0.6049114668    0.3624084689    -49.4193070424
    -4.66    0.6061318662    -0.1116152846    -45.3903427551
    -4.65    0.6028128619    -0.5455353379    -41.402398267
    -4.64    0.5953531162    -0.9398732566    -37.4773699014
    -4.63    0.584144939    -1.295357728    -33.6347758856
    -4.62    0.5695724333    -1.6129013146    -29.8918666145
    -4.61    0.5520098129    -1.8935779158    -26.2637372806
    -4.6    0.5318197481    -2.1386023608    -22.7634401771
    -4.59    0.5093521716    -2.3493100652    -19.4020989128
    -4.58    0.4849431503    -2.5271388012    -16.1890204734
    -4.57    0.4589139204    -2.6736102505    -13.1318074451
    -4.56    0.4315701637    -2.7903146416    -10.2364698592
    -4.55    0.40320138    -2.8788944894    -7.5075328206
    -4.54    0.3740804288    -2.9410306105    -4.9481437903
    -4.53    0.3444632225    -2.9784288939    -2.5601769784
    -4.52    0.3145885752    -2.9928079976    -0.3443350898
    -4.51    0.2846780663    -2.9858882109    1.6997526156
    -4.5    0.2549361096    -2.9593810673    3.5734349444
    -4.49    0.2255500811    -2.914980171    5.2789465493
    -4.48    0.196690587    -2.854352683    6.8193197555
    -4.47    0.1685116689    -2.7791318244    8.1982999898
    -4.46    0.141151285    -2.6909101252    9.4202644432
    -4.45    0.1147316468    -2.591233533    10.4901451334
    -4.44    0.0893598022    -2.4815961777    11.4133552468
    -4.43    0.0651281229    -2.3634359637    12.1957196994
    -4.42    0.0421148957    -2.2381307263    12.8434097359
    -4.41    0.0203849379    -2.1069951769    13.3628801452
    -4.4    -0.0000097439    -1.9712782686    13.7608120666
    -4.39    -0.0190293024    -1.8321612526    14.044058007
    -4.38    -0.0366453525    -1.6907561851    14.2195910753
    -4.37    -0.0528402799    -1.5481049961    14.2944581756
    -4.36    -0.0676065415    -1.405178955    14.2757359245
    -4.35    -0.0809459513    -1.2628786732    14.1704908044
    -4.34    -0.0928689735    -1.1220341608    13.9857417331
    -4.33    -0.1033940294    -0.983405703    13.7284268967
    -4.32    -0.1125467891    -0.84768473    13.4053729878
    -4.31    -0.1203595069    -0.7154950807    13.023267248
    -4.3    -0.1268703266    -0.5873944705    12.588633357
    -4.29    -0.1321226754    -0.463876347    12.1078087969
    -4.28    -0.1361645757    -0.3453717875    11.5869262042
    -4.27    -0.1390480642    -0.2322516343    11.0318959914
    -4.26    -0.1408286021    -0.1248287596    10.4483922879
    -4.25    -0.1415644965    -0.0233605795    9.8418404494
    -4.24    -0.1413163522    0.0719484753    9.2174075312
    -4.23    -0.1401465748    0.1609443288    8.5799937399
    -4.22    -0.1381188688    0.243520541    7.9342267623
    -4.21    -0.1352977717    0.3196155536    7.2844573373
    -4.2    -0.1317482293    0.3892099466    6.634756494
    -4.19    -0.1275351821    0.4523235834    5.9889145246
    -4.18    -0.1227231793    0.5090128328    5.3504415677
    -4.17    -0.1173760412    0.5593677762    4.7225688428
    -4.16    -0.1115565369    0.6035094259    4.1082518294
    -4.15    -0.1053260718    0.641586975    3.5101741842
    -4.14    -0.0987444324    0.673775118    2.9307527417
    -4.13    -0.0918695418    0.7002714303    2.3721435611
    -4.12    -0.0847572521    0.7212937351    1.8362484309
    -4.11    -0.0774611301    0.7370776486    1.3247226802
    -4.1    -0.0700323242    0.7478741677    0.8389830845
    -4.09    -0.0625193942    0.7539472543    0.3802166184
    -4.08    -0.0549682099    0.7555716613    -0.0506103103
    -4.07    -0.0474218456    0.7530307208    -0.4527422587
    -4.06    -0.0399205132    0.7466143274    -0.825624882
    -4.05    -0.0325014969    0.7366169499    -1.1688946163
    -4.04    -0.0251991207    0.7233357734    -1.4823683662
    -4.03    -0.0180447351    0.707068964    -1.7660328769
    -4.02    -0.0110667016    0.6881140106    -2.0200339623
    -4.01    -0.0042904299    0.666766201    -2.2446660747
    -4    0.002261618    0.6433171589    -2.4403612565
    -3.99    0.0085698663    0.6180535809    -2.6076788103
    -3.98    0.0146175783    0.5912559355    -2.7472945567
    -3.97    0.0203907834    0.5631974316    -2.8599905214
    -3.96    0.0258782073    0.5341429399    -2.9466446612
    -3.95    0.0310711752    0.5043481348    -3.0082208194
    -3.94    0.0359635213    0.4740586572    -3.0457589085
    -3.93    0.0405514836    0.4435094059    -3.0603654463
    -3.92    0.0448335905    0.4129239132    -3.0532042637
    -3.91    0.0488105482    0.3825138428    -3.0254874813
    -3.9    0.0524851176    0.352478514    -2.9784669905
    -3.89    0.055861991    0.323004574    -2.9134261006
    -3.88    0.0589476606    0.2942657032    -2.8316716465
    -3.87    0.0617502922    0.2664224437    -2.7345263862
    -3.86    0.0642795874    0.2396220453    -2.62332181
    -3.85    0.0665466564    0.2139984277    -2.4993913461
    -3.84    0.0685638818    0.189672204    -2.3640639552
    -3.83    0.0703447842    0.1667507387    -2.2186580232
    -3.82    0.0719038946    0.1453282952    -2.0644757857
    -3.81    0.0732566197    0.1254862072    -1.9027980574
    -3.8    0.0744191168    0.107293135    -1.7348793642
    -3.79    0.075408168    0.0908053387    -1.5619434833
    -3.78    0.0762410565    0.0760670209    -1.3851793142
    -3.77    0.0769354493    0.0631106753    -1.2057372237
    -3.76    0.077509282    0.0519575032    -1.0247256683
    -3.75    0.077980646    0.0426178427    -0.8432081932
    -3.74    0.0783676847    0.0350916326    -0.6622008981
    -3.73    0.0786884914    0.0293688985    -0.48...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here