1 / 3

3. Lagrange Interpolation:

3. Lagrange Interpolation:. (pp.939). Exp 3.1:. li.txt. 4 0,3 2,60 4,90 10,120 8. Sub lagri_Click () ' Change File li.txt for different problems fl = fl0 + "li.txt": Open fl For Input As 1 Input #1, nx: n=nx-1: ReDim xd(nx), f(nx) For k = 0 To n: Input #1, xd(k), f(k): Next k

bette
Download Presentation

3. Lagrange Interpolation:

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 3. Lagrange Interpolation: (pp.939) Exp 3.1:

  2. li.txt 4 0,3 2,60 4,90 10,120 8 Sub lagri_Click () ' Change File li.txt for different problems fl = fl0 + "li.txt": Open fl For Input As 1 Input #1, nx: n=nx-1:ReDim xd(nx), f(nx) For k = 0 To n: Input #1, xd(k), f(k): Next k Input #1, x: Close #1 Call cls1: Print nx: Print For k = 0 To n: Print xd(k), f(k): Next k FX = 0 For k = 0 To n LKX = CDbl(1): LKXK = CDbl(1) For i = 0 To n If i = k Then 55 LKX = LKX * (x - xd(i)): LKXK = LKXK * (xd(k) - xd(i)) 55 Next i FX = FX + (LKX / LKXK) * f(k) Next k Print : Print " RESULT : ", x, FX End Sub

  3. path.mak, path.frm

More Related