{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

View Full Document Right Arrow Icon
%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)
Image of page 1
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

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern