Question: Thank You 6. (20 points) Write a Matlab code that uses the forward, backward and centered difference approximation to es- timate the first derivative of
Thank You
6. (20 points) Write a Matlab code that uses the forward, backward and centered difference approximation to es- timate the first derivative of the function: f(t) = 25 cos(2t), evaluates the derivative at t = 2 and compare the re- sults with exact value of the derivative. Plot the ab- solute errors vs the step size, h. What is the optimal step size for each case
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
