Question: ONE QUICK QUESTION USING MATLAB *************************************************************************************************** Write a MATLAB function that accepts as input a set of {x_i, y_i} data and a desired x value,

ONE QUICK QUESTION USING MATLAB

***************************************************************************************************

 ONE QUICK QUESTION USING MATLAB *************************************************************************************************** Write a MATLAB function that

Write a MATLAB function that accepts as input a set of {x_i, y_i} data and a desired x value, and returns the corresponding y value by performing linear interpolation. Your function should be able to be used with the following format: yinterpolated = yourfunctionname (x, y, xgoal); x is a vector of x values, y is a vector of y values, and the function should return the value y(xgoal). You may make the following assumptions about the inputs to the function. The inputs x and y are vectors of the same length. The length of x and y is at least 2. The x values are already sorted from smallest to largest values. xgoal is a scalar (single valued) number, and it falls between the smallest and largest values of the values in the vector x. Your function should NOT display anything to the screen. Please write your function as a separate M-file and upload it separately with the rest of the homework assignment

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!