optimization.docx

Figure 4 finding the coefficient figure 4 shows the

  • No School
  • AA 1
  • 30

This preview shows page 24 - 30 out of 30 pages.

algorithm and the computation of the divided difference table. Figure 4. Finding the coefficient Figure 4 shows the algorithm for finding the coefficient of the newton polynomial by assigning it as x0. Then we sum the coefficient to find the data function as a given point (IP=sum(c) ; ).
Image of page 24

Subscribe to view the full document.

25 Figure 5. Running the program After encoding the program, save and execute for simulation in the Scilab console. Figure 6. Results of program execution. This figure shows the Scilab console. In order to get the desired interpolation at a given point in a function of x, one must encode the datas of x and f, according to the table of heat and corresponding specific heat, based on the problem given. And also indicate the point of
Image of page 25
26 interpolation as x0. Then call out the function IP and that will yield to the answer of the Newton’s Divided Difference of interpolation. Figure 7. Shows the Divided Difference Table and the yielded answer. Figure 8. Shows command to plot the data given.
Image of page 26

Subscribe to view the full document.

27 Figure 9. Plotted points of the data given, including the point of interpolation. Transcript of the program in the scinotes: funcprot(0) function IP =Newton_Divided ( x , f , x0 ) n=length( x ); a(1)= f (1); for k=1:n-1 D(k,1)=( f (k+1)- f (k))/( x (k+1)- x (k)); end
Image of page 27
28 for j=2:n-1 for k=1:n-j D(k,j)=(D(k+1,j-1)-D(k,j-1))/( x (k+j)- x (k)) end end disp(D,'The Divided Difference Table') for j=2:n a(j)=D(1,j-1); end Df(1)=1; c(1)=a(1); for j=2:n Df(j)=( x0 - x (j-1))*Df(j-1) c(j)=a(j)*Df(j); end IP =sum(c); Endfunction Transcript of the program in the scilab console:
Image of page 28

Subscribe to view the full document.

29 x=[22 42 52 82 100] f=[4181 4179 4186 4199 4217] x0=90 IP=Newton_Divided(x,f,x0) VIII. Conclusion There are new and traditional ways to solve interpolation problems. With knowledge on manual calculations and basic programming skills using the Scilab application, we can come up with solutions for Newton’s Divided Difference problems. With the aid of Scilab, it is much easier to solve for algorithms and mathematical problems such as Newton’s Divided Difference and Optimization. With Scilab, solving can be easier, faster and efficient. References
Image of page 29
30
Image of page 30

{[ 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