Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how to call this function (polynomial interpolation) in main program to get interpolated values? This is the function I wrote but I want you to

how to call this function (polynomial interpolation) in main program to get interpolated values?
image text in transcribed
image text in transcribed
This is the function I wrote but I want you to call this function in main program so that I can get interpolated values (C++) and run the whole program.
#include #include #include using namespace std; double polint (double x, double xil), double yi[l, int isize, int npoints) double lambdaisize): double y int i, is, 11; W check order of interpolation if (npoints > isize) npoints - isize; // ouside the in interval if (x = xiisize-1]) return y = yi[isize-1]: // loop while (= x) break; j = 3 + 1; loop 3 = 0; while (5 - x) break: 2 shifts to correspond to inpoint-1).th interpolacion npoints/2: sit ouside of the range to...size-1) if (c ) 03 16 +points-i > inize-1 ) juisize-npoints: Y-0.07 for tis - 51 is cnpoints-i; is - 1s+1) 1 lambda fis-1.01 for (11- ): il cj+ npoints-1: 11 - 11 + 1) 11(11 - 1a lambda isj - lambda (isl. ix-x1[11]/exii-xi (111) y = y + yi[is]lambda (11 returny int main()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions