Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer this question using Matlab. Thank you! 7) Use mylagrange in this problem. 1614 Chapter 12. Interpolation and Approximation a) Plot the five Lagrange

Please answer this question using Matlab. Thank you!

image text in transcribed

image text in transcribed

7) Use mylagrange in this problem. 1614 Chapter 12. Interpolation and Approximation a) Plot the five Lagrange polynomials for the abscissas of the data points ((1,3), (3,4), (4,2), You are only allowed to useplot function, but you can put it inside 5,-1), (8, 5) for E [1,8) Note (this part only): a for loop. Also, use these Lagrange polynomials to plot the unique polynomial which passes through the data points as a dotted line. b) Repeat the previous part, using the abscissas 1, 1.1, 4, 5, 8, but keeping the old ordinates to "see" what happens when ordinates are close to one another. c) Repeat the previous part, but using the nodes 1, 3, 3.1, 3.2, 8. d) Repeat the previous part, but using the nodes 1, 3, 4, 7.99, 8. Note: In these four plots include the abscissas by "title (num2str(xdp))" The Lagrange polynomial l, can be evaluated at one or more points by function y = mylagrange (xdp, j, x) % input : xdpse abscissas of data points j evaluate j-th lagrange polynomial x = points where polynomial or derivative is evaluated: scalar, vector, or matrix % ell-j (x) output : nr_dp = length (xdp); y-1, % y or yones (size (x)) for k 1:nr dp end end end

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions