{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

newpolyuse

newpolyuse - p4(x)=p3(x D(5,5(x-1(x-2(x-3(x-4%evaluate...

This preview shows page 1. Sign up to view the full content.

%function y=3.6/x x=[1,2,3,4,5]; y=[3.6,1.8,1.2,.9,.72]; %%using newpoly! %%D=divided diff table %%C=newton polynomial!! %%5 data points gives a 4th degree polynomial p1(x)=D(1,1)+D(2,2)*(x-1) p2(x)=p1(x)+D(3,3)*(x-1)*(x-2) p3(x)=p2(x)+D(4,4)*(x-1)*(x-2)*(x-3)
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: p4(x)=p3(x)+D(5,5)*(x-1)*(x-2)*(x-3)*(x-4) %%evaluate newton polynomial p4(x) at x=2.5 polyval(C,2.5) %%plot the actual function and newton poly obtained x1=linspace(.5,5.5); y1=3.6./x1; ynew=polyval(C,x1); plot(x1,y1,'--',x1,ynew) p...
View Full Document

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern