Question: Please explain it in Matlab code. Thank you. 6. (20 points) Write a Matlab code that uses the forward, backward and centered difference approximation to

Please explain it in Matlab code. Thank you. 6. (20 points) WritePlease explain it in Matlab code. 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 t cos(t), 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

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!