Question: please include matlab code and explain Spline interpolation (25 points) Download the starter code Hw6p1.m from CANVAS Files section folder HW Problems to your computer,

 please include matlab code and explain Spline interpolation (25 points) Downloadplease
include matlab code and explain

Spline interpolation (25 points) Download the starter code Hw6p1.m from CANVAS Files section folder "HW Problems" to your computer, and rename it as YourlastnameyourfirstnameHW6p1.m. The starter code uses data from the U.S. Standard Atmosphere 1976 model to plot how the average temperature (in degree Celcius) varies with altitude (in Km) above the Earth's sea level. Write your code between lines 27 and 30 of the starter file to compute and plot the linear spline (in red solid line), the quadratic spline (green dash dotted line), the cubic spline (blue dashed line) interpolants together with the datapoints in grey circles (already plotted). In other words, running your code should generate all the plots in the same figure. To do the spline interpolation, you don't need to code the square linear systems from scratch. Instond, look up MATLAB inbuilt commands spapi and fnval in MATLAB documentation. For computing degreed spline, the first argument of spapi must be d+1. So, spapi (2........) for linear spline, etc. The second argument of fnval must be h (defined in line 10) for linear spline, and h.query (defined in line 24) for higher degree splines

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!