資源描述:
《分段線性插值法求插值.doc》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在學(xué)術(shù)論文-天天文庫(kù)。
1、分段線性插值法求插值摘要本文根據(jù)題目的要求,利用分段線性插值法對(duì)采樣點(diǎn)和樣本值進(jìn)行插值計(jì)算。為了更好的評(píng)斷模型的優(yōu)化性,我們同時(shí)采用了最近點(diǎn)插值,3次多項(xiàng)式插值和3次樣條插值法來(lái)處理同樣的問(wèn)題,作為分段線性插值方法的參考模型。根據(jù)插值函數(shù)計(jì)算區(qū)間內(nèi)任意取樣點(diǎn)的函數(shù)值。最后再利用所得函數(shù)值畫(huà)出相應(yīng)的函數(shù)圖象,并與原函數(shù)g(x)的圖象進(jìn)行對(duì)比。通過(guò)對(duì)本題四個(gè)問(wèn)題的解答,并觀察對(duì)比函數(shù)圖象我們得到了如下兩個(gè)重要的結(jié)論:(1)在同一取樣點(diǎn),利用不同的插值方法可能會(huì)得到不同的函數(shù)值,所得函數(shù)值與原函數(shù)的標(biāo)準(zhǔn)函數(shù)值的誤差大小決定了該插值方法的“好壞”。而
2、最優(yōu)化的插值方法往往依賴于被插值函數(shù)。本題中,在函數(shù)式g(x)對(duì)應(yīng)X,Y的條件下,可以根據(jù)對(duì)比函數(shù)圖象明顯看出:分段線性插值方法和3次多項(xiàng)式插值方法優(yōu)于3次樣條插值和最近點(diǎn)插值。(2)在插值計(jì)算中,取樣點(diǎn)的多少往往會(huì)影響所得插值函數(shù)優(yōu)化程度。一般情況下,取樣點(diǎn)越多所得插值函數(shù)越優(yōu)化,對(duì)應(yīng)的函數(shù)值與標(biāo)準(zhǔn)函數(shù)值越接近。通過(guò)對(duì)本題四個(gè)問(wèn)題相應(yīng)對(duì)比函數(shù)圖象的觀察,我們也明顯看出:在區(qū)間[-66]內(nèi),當(dāng)取樣點(diǎn)為21,41時(shí),分段線性插值法進(jìn)行插值計(jì)算得到的函數(shù)圖象基本上與原函數(shù)g(x)吻合。AbstractInthisarticle,weusepiec
3、ewiselinearinterpolationtocomputethesamplingpointandsamplevalueaccordingtotherequestofquestion.Inordertojudgethemodel'squalityinabetterway,weusenearestinterpolation,cubicinterpolationandsplineinterpolationregardedasthemodelreferenceofpiecewiselinearinterpolationtodealtheque
4、stioninthesamewayatthesametime.Thendrawthefunctionpicturebyfunctionvalueofanysamplingpointintheintervalofinterpolatingfunction.Finally,wemakeacomparisonbetweentheoriginalfunctiong(x)imageandtheinterpolatingfunctionimage.Atthebaseofanalysingthefinalresultandcomparingtheconst
5、rastiveimage.Wecansummarizetwoitemsofimportantconclusionasfollows:(1)Atthesamesamplingpoint,differentinterpolatingmethodcanobtaindifferentfunctionvalue.Usually,theoptimizationalgorithmdependsonthesizeoferrorbetweentheobjectfunctionvalue.(2)Whenprocessinginterpolatingcompute
6、,thenumberofthesamplingpointwillmakeaneffectonthequalityofamodel.Commonly,themoremultitudinousthesamplingpointswereused,themoreprecisetheinterpolationmodelwillbe.目錄一.問(wèn)題的重述………………………………………………1二.問(wèn)題的分析………………………………………………1三.問(wèn)題的假設(shè)………………………………………………1四.分段線性插值原理………………………………………2五.問(wèn)題的求
7、解………………………………………………2六.插值方法的優(yōu)劣性分析…………………………………5附錄……………………………………………………………6一.問(wèn)題的重述已知,用分段線性插值法求插值,繪出插值結(jié)果圖形,并觀察插值誤差。1.在[-6,6]中平均選取5個(gè)點(diǎn)作插值2.在[-6,6]中平均選取11個(gè)點(diǎn)作插值3.在[-6,6]中平均選取21個(gè)點(diǎn)作插值4.在[-6,6]中平均選取41個(gè)點(diǎn)作插值二.問(wèn)題的分析在數(shù)值計(jì)算中,已知數(shù)據(jù)通常是離散的,如果要得到這些離散點(diǎn)以外的其他點(diǎn)的函數(shù)值,就需要根據(jù)這些已知數(shù)據(jù)進(jìn)行插值。而本題只提供了取樣點(diǎn)和原函數(shù)g(x)
8、.分析問(wèn)題求解方法如下:(1)利用已知函數(shù)式計(jì)算取樣點(diǎn)X對(duì)應(yīng)的函數(shù)值Y;將X,Y作為兩個(gè)等長(zhǎng)的已知向量,分別描述采樣點(diǎn)和樣本值.因此被插值函數(shù)是一個(gè)單變量函數(shù),可利