Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need the code of MATLAB. Implement the algorithm divdiff and newtval discussed in class. To use the algorithms, you'll have code similar to this: v

image text in transcribed

Need the code of MATLAB.

Implement the algorithm divdiff and newtval discussed in class. To use the algorithms, you'll have code similar to this: v = (x vector of data) c = (y vector of data) D = divdiff (X, Y); x = 0: 65; n = length(x); y = zeros (1,n); for k = 1:n y(k) = newtval(D,X, X(k)); end plot (X,Y,'o',x,y), axis ( [0 65 O 50]) Apply the algorithms to the following problem: Experiments are run to measure the fuel consumption of a car travelling at a constant speed. Let v be the speed in miles per hour, let m(v) be the mileage in miles per gallon, and c(v) be the fuel consumption in gallons per hour. The following table gives data on the fuel consumption of a 1993 Subaru Legacy when run at constant speed: v(mi/hr) c(v) (gal/hr) 5 10 .333 .4 15 20 25 30 .4688 .5882 .6757.75 50 55 60 1.471 1.447 1.667 65 1.912 Convert the fuel consumption c(v) to fuel mileage m(v). Build the interpolating polynomial using divdiff for the data set (v, m(v)) and use it to estimate the fuel mileage when the car travels at 40 mph

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_2

Step: 3

blur-text-image_3

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

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions