A very easy way to plot a function, get the first derivative and animate a slope line along the graph in Matlab.
This is very basic but shows a lot of what can be done quickly using Matlab. Feel free to comment if anything can be done differently or easier!!!
lines 12-14 can be replaced simply by m = ( f(a+h) - f(a-h) ) / (2*h)