拉格朗日插值法matlab上机,拉格朗日插值法使用MATLAB做的例题
《拉格朗日插值法使用MATLAB做的例題》由會(huì)員分享,可在線閱讀,更多相關(guān)《拉格朗日插值法使用MATLAB做的例題(2頁(yè)珍藏版)》請(qǐng)?jiān)谌巳宋膸?kù)網(wǎng)上搜索。
1、一物體廓線數(shù)據(jù)如下:x035791112131415y01.21.72.02.12.01.81.21.01.6用拉格朗日插值法計(jì)算x每改變0.5時(shí)y的值,即x 取 0.5, 1, 1.5, , 14.5 時(shí)對(duì)應(yīng)的y值。程序如下程序運(yùn)行結(jié)果: x=0 3 5 7 9 11 12 13 14 15; y=0 1.2 1.7 2.0 2.1 2.0 1.8 1.2 1.0 1.6; xi=0.5:0.5:14.5; yi=lang(x,y,xi)yi =Columns 1 through 8-15.4117 -15.9238 -10.9898 -5.4272 -1.2253 1.2000 2.1765 2.2666Columns 9 through 161.9894 1.7000 1.5703 1.6249 1.7995 2.0000 2.1477 2.2040Columns 17 through 242.1752 2.1000 2.0269 1.9904 1.9928 2.0000 1.9537 1.8000Columns 25 through 291.5272 1.2000 0.9656 1.0000 1.3480 plot(x,y,b:,xi,yi)運(yùn)行圖。
總結(jié)
以上是生活随笔為你收集整理的拉格朗日插值法matlab上机,拉格朗日插值法使用MATLAB做的例题的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: requests模块相关用法
- 下一篇: dyaddown matlab,matl