Question: c) Write a MATLAB function that given two vectors x and y, an index i, and the order of accuracy (n = 2,4) evaluates

c) Write a MATLAB function that given two vectors x and y, 



c) Write a MATLAB function that given two vectors x and y, an index i, and the order of accuracy (n = 2,4) evaluates the first-order derivative of y at position i in terms of central finite differences with errors of order h (n-2) and h* (n=4) (hint: you don't need to derive the formulas, look them up in the class book). d) Using the experimental data in the following table, compute the rate-of-change of Penicillin concentration at times 40, 80, 100 and 160 using the function implemented in point (c) with errors of order h and h*. Time (years) Penicillin Time concentration (years) Penicillin concentration (units/mL) (units/mL) 0 0 120 9430 20 106 140 10950 40 1600 160 10280 60 3000 180 9620 80 5810 200 9400 100 8600

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 Computer Network Questions!