This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ,5))’;
>> plot(x,y,’ro’,xp,yp,’-’) % or try xp=(-3:.1:5)’; The
150 title page 100
50 contents 0
−4 −2 0 2 4 6 Figure 5 The interpolating polynomial must pass through each data point. Homework
In the past, students in linear algebra usually begin using the computer way too soon on this
assignment. They start typing this and that at the Matlab prompt, and it isn’t long before they
are totally confused. Why does this happen? What can you do to avoid being frustrated?
First, write down the appropriate general form of the interpolating polynomial on notebook
paper. Then, substitute each data point into the general form. Write down the system of equations generated by each data point on your notebook paper. Now you can go to the computer. previous page
exit Enter the augmented matrix, place the result into reduced row echelon form, then return to your
notebook paper and write down the reduced row echelon form of the augmented matrix. Write
down the values of the unknown coeﬃcients, then substitute them into your general form and
write the equation of the interpolating polynomial on your notebook paper. The
Polynomial You are now ready to return to the computer. Enter the data points in the vectors x and y.
Enter the interpolating polynomial in the vector p. Finally, follow the examples in the narrative
to craft a plot of the interpolating polynomial that passes through each of the given data points.
1. Find a tenth degree interpolating polynomial that passes through the points (−5, −10),
(−4, −5), (−3, 2), (−2, −5), (−1, 6), (0, 8), (1, 1), (2, −9), (3, 1), (4, 2), and (5, −1). Obtain a
plot of the data points that includes the graph of the interpolating polynomial.
Note: This problem has caused searing headaches for linear algebra students at the College over the last few years. It turns out that the interpolating polynomial is extremely
sensitive to small changes in some of its coeﬃcients. That is,...
View Full Document
- Summer '12