Question: Please anwser in MatLab code :) Here is the myinterpoltation code: y = myinterpolate(x,y,x) n = length(x); if (x x(n) y = 'x is out

Please anwser in MatLab code :)
Here is the myinterpoltation code:
y = myinterpolate(x,y,x) n = length(x); if (x x(n) y = 'x is out of bounds'; return; end k = 1; while x > x(k) k = k+1; end k = k-1; y = y(k)+((y(k+1)-y(k))/x(k+1)-x(k))*(x-x(k));
This problem is the continuation of problem2 of HW8. Chemical reaction rates depend on a reaction-rate constant that is a function of temperature and activation energy: k = k_0 e^-Q/RT In HW8 you linearized the formulation and interpolated unknown values on the linear version of the formulation. In this problem we assume that we have no knowledge of mathematical relationship between T and k. Develop function myinterpolation as shown in class and test it with a simple six points dataset; x = 0:5, y = [15 10 9 6 20]; interpolate x = 3.5. Now consider the following data: Plot the data with T on the x-axis and k on the y-axis. Use my interpolation function to find the values of k for T = 500K and T = 590K. Use the Matlab function linterp to find the values of k for T = 500K and T = 590K. Use the Matlab function interp 1 with the 'spline' option to find the values of k for T = 500K and T = 590K. Discuss and compare the results from HW8, part d, and part e
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
