Question: Mat lab Chapter 7 textbook-2, 3, 4, 15, 16 2. Generate f x2 for x [-3,-1,0,2,5,6]. Compute the value of f4) using linear interpolation and
Mat lab Chapter 7 textbook-2, 3, 4, 15, 16 2. Generate f x2 for x [-3,-1,0,2,5,6]. Compute the value of f4) using linear interpolation and cubic- spline interpolation. What are the respective errors when the answer is compared with the actual value of f(4)? Cylinder Heat Temperatures Assume the set of temperature measurements in Table is taken from the cylinder head in a new engine that is being tested for possible use in a race car. Table: Cylinder head temperatures Time (s 0.0 1.0 2.0 3.0 4.0 5.0 3. Compare plots of these data, assuming linear interpolation and assuming cubic spline interpolation for values between the data points, using time values from 0 to 5 in increments of 0.1s. Temperature (CE 0.0 20.0 60.0 68.0 77.0 110.0 4. Using the data from problem 3, find the time value for which there is the largest difference between its linear-interpolated temperature andrits cubic-interpolated temperature. Simple Root Finding Even through MATLAB makes it easy to find the roots of a function, sometimes all that is needed is a quick estimate. This can be done by plotting a function and zooming in very close to see where the function equals zero. Since MATLAB draws straight lines between data points in a plot, it is good to draw circuit or stars at each data point, in addition to the straight lines connecting the points 15 Plot the following function, and zoom in to fine the roots: n-5; x-linspace(0,2 "pi,n); y-x."sin(x)+cos(1/2*x).02-1./(x-7): plot(x y'-o) 16. Increase the value of n to increase the accuracy of the estimate in Problem 15
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
