資源描述:
《樣條插值_______作業(yè)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫(kù)。
1、東南大學(xué)《數(shù)學(xué)實(shí)驗(yàn)》報(bào)告學(xué)號(hào)06010314姓名梅杰成績(jī)實(shí)驗(yàn)內(nèi)容:計(jì)算矩陣特征值、特征向量;AHP方法的建模與實(shí)現(xiàn)一實(shí)驗(yàn)?zāi)康膶W(xué)習(xí)matlab解題以及插值法使用二預(yù)備知識(shí)(1)熟悉樣條插值的含義及計(jì)算方法(2)熟悉Matlab命令三實(shí)驗(yàn)內(nèi)容與要求已知某平原地區(qū)的一條公路經(jīng)過(guò)如下坐標(biāo)所表示的點(diǎn)。(1)請(qǐng)用樣條插值繪出這條公路。(不考慮公路寬度)X/米03050708090120148170180Y/米80644742486680120121138X/米202212230248268271280290300
2、312Y/米160182200208212210200196188186X/米320340360372382390416430478440Y/米200184188200202240246280296308X/米420380360340320314280240200Y/米334328334346356360392390400(2)對(duì)于上表給出的數(shù)據(jù),估計(jì)公路長(zhǎng)度。用MATLAB解題如下:(1)x1=[0,30,50,70,80,90,120,148,170,180,202,212,230,248,268
3、,271,280,290,300,312,320,340,360,372,382,390,416,430,478];y1=[80,64,47,42,48,66,80,120,121,138,160,182,200,208,212,210,200,196,188,186,200,184,188,200,202,240,246,280,296];x2=[440,420,380,360,340,320,314,280,240,200];y2=[308,334,328,334,346,356,360,392,
4、390,400];xx=0:1:478;yy=spline(x1,y1,xx);plot(x1,y1,’o’,xx,yy,’m’)holdonxxx=440:-1:200;yyy=spline(x1,y1,xxx);plot(x2,y2,’o’,xxx,yyy,’m’)得到樣條插值函數(shù)所插值出來(lái)的圖像:(2)由于只要估計(jì)公路的長(zhǎng)度,故直接算兩點(diǎn)間連線的長(zhǎng)度的總合,命令如下:X=[03050708090120148170180202212230248268271280290300312320340360
5、372382390416430478440420380360340320314280240200];Y=[80644742486680120121138160182200208212210200196188186200184188200202240246280296308334328334346356360392390400];plot(X,Y,'o-')fork=1:length(X)-1len(k)=sqrt((X(k+1)-X(k))^2+(Y(k+1)-X(k))^2);endLen=sum(
6、len)而最終得到結(jié)果為:Len=3.0540e+003即該公路大約長(zhǎng)3054米。Matlab繪圖: