Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve by writing a Matlab code and show what the code is by typing it into the window in Matlab thanks Problem 2 Use

image text in transcribedPlease solve by writing a Matlab code and show what the code is by typing it into the window in Matlab thanks
Problem 2 Use MATLAB to generate 7 equally spaced data points from Runge's function: f(x)= 1+25x2 on the interval -1 sr1. Use these 7 data points to generate an interpolated approximation of the functionfx) forx--1:0.01:1] using: a) A 6th order polynomial. b) A linear spline. c) 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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

6. Are my sources reliable?

Answered: 1 week ago