4 x3 x2 x onessizex and y the coecient matrix of

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 4 2 ax3 + bx3 + cx3 + dx3 + e = y3 next page (5) close exit The augmented matrix for system 5 is 3 x 4 x1 1 3 4 x2 x2 4 3 x3 x3 x4 x3 4 4 3 4 x5 x5 2 x1 2 x2 2 x3 2 x4 2 x5 x1 x1 x3 x4 x5 1 1 1 1 1 y1 y2 y3 . y4 y5 The Interpolating (6) Polynomial If x1 x2 x = x3 x 4 x5 y1 y2 y = y3 , y 4 y5 and title page note that the columns of the augmented matrix (6) are x.ˆ4, x.ˆ3, x.ˆ2, x, ones(size(x)), and y. The coefficient matrix of system 5, 4 3 2 x2 x2 x2 x1 1 4 3 2 x3 x3 x3 x3 1 (7) x4 x3 x2 x 1 , 4 4 4 4 3 4 2 x5 x5 x5 x5 1 previous page is called a Vandermonde matrix. The Vandermonde matrix is important in a number of applications, but it is particularly useful when computing the interpolating polynomial. back For our next example, we will find a fourth degree interpolating polynomial that passes through the points (−2, 26), (−1, −2), (1, −4), (2, −2), and (4, 128). First, substitute each data point into the equation for a general fourth degree polynomial, y = ax 4 + bx 3 + cx 2 + dx + e. contents next page print doc close exit a(−2)4 + b(−2)3 + c(−2)2 + d(−2) + e = 26 The a(−1)4 + b(−1)3 + c(−1)2 + d(−1) + e = −2 a(1)4 + b(1)3 + c(1)2 + d(1) + e = −4 (8) a(2)4 + b(2)3 + c(2)2 + d(2) + e = −2 4 3 Interpolating Polynomial 2 a(4) + b(4) + c(4) + d(4) + e = 128 The augmented matrix for system 8 is (−2)4 (−2)3 (−1)4 (−1)3 14 13 24 23 44 43 (−2)2 (−1)2 12 22 42 −2 −1 1 2 4 Note that the coefficient matrix of system 5 is (−2)4 (−2)3 (−2)2 (−1)4 (−1)3 (−1)2 14 13 12 24 23 22 44 43 42 1 26 1 −2 1 −4 . 1 −2 1 128 (9) title page −2 −1 1 2 4 1 1 1. 1 1 contents (10) Note that the coefficient matrix (10) is a Vandermonde matrix, where x1 −2 x2 −1 x = x3 = 1 . x 2 4 x5 4 Matlab’s matrix building capability makes it especially easy to create the augmented matrix (9). First, enter the data points in two column vectors. previous page next page back print doc close exit >> x=[-2 -1 1 2 4]’ x= -2 -1 1 2 4 >> y=[26 -2 -4 -2 128]’ y= 26 -2 -4 -2...
View Full Document

This document was uploaded on 02/14/2014.

Ask a homework question - tutors are online