Question: Problem 3: Linear Spline in Matlab. Preparation Read through the rest of A Practical Introduction to Matlab by Gock- enbach, at the web site http://www.math.mtu.edu/



Problem 3: Linear Spline in Matlab. Preparation Read through the rest of "A Practical Introduction to Matlab" by Gock- enbach, at the web site http://www.math.mtu.edu/ msgocken/intro/intro.pdf Your task. Write a Matlab function that computes the linear spline interpolation for a given data set. You might need to take a look at the file cspline_eval.m for some hints. Name your Matlab function lspline. This can be defined in the file lspline.m, which should begin with: function ls lspline (t,y,x) lspline computes the linear spline Inputs t: vector contains the knots y: vector, contains the interpolating values at knots t x: vector contains points where t 1spline function he should be evaluated and plotted Output: ls: vector contains the values of lspline at points x Use your Matlab function lspline on the given data set in Problem 2, plot the linear spline for the interval 1.2, 2.2 what to hand in: Hand in the Matlab file lspline.m, the script file, and your plots
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
