# Matlab ICE

Recall that we can approximate the derivative of a function*f*at a point

*x*using the formula

_{h}= (f(x+h)-f(x-h)) / (2h).

For this exercise, you must write a function deriv_test that takes three arguments: the function

*f*, the point where the derivative is to be approximated

*x*, and the correct value of the derivative. Thus, the function will be called as

`deriv_test(f,x,correct)`. The function will compute the above approximation to the derivative for values of

*h*going down in powers of ten, with exponent

*p*, from 10

^{-1}to 10

^{-16}. It will plot the absolute error |f'(x)-F

_{h}|

for each of those values of p = -1, -2, ..., -16. In other words, the power

*p*of 10 is on the horizontal axis, and the error is on the vertical axis. The function must return the vector of approximations to the derivative.

A solution for the
final is available.