Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve c and d using Matlab. Thank you Problem 2 Use MATLAB to generate 7 equally spaced data points from Runge's function: f(x)- 1+25x2

image text in transcribedPlease solve c and d using Matlab. Thank you
Problem 2 Use MATLAB to generate 7 equally spaced data points from Runge's function: f(x)- 1+25x2 on the interval -1 Sxs1. Use these 7 data points to generate an interpolated approximation of the function fx) forx [-1:0.01:1] using: a) A 6h order polynomial. b) A linear spline. e) A cubic spline with derivative end conditions equal to the exact values of the derivative calculated analytically. d) A cubic spline with "not-a-knot" end conditions For each case, calculate the relative error (a) for every value of x ANSWERS: Save your results for (a), (b), (c), and (d) as column vectors (201x1) and write to A5.dat, A6.dat, A7.dat and A8.dat respectively. Save your & results to a matrix (201x4) with the error results for (a) in the first column, the results for (b) in the second column, the results for (c) in the third column and the results for (d) in the fourth column and write this matrix to A9.dat

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

More Books

Students also viewed these Databases questions