MATLAB: Plot Y derivative and find resulting X value minimum

y derivative plot minimum value

, I have X and Y data as time and distance. I would like to find the derivative the Y values and plot this. Therefore yielding an acceleration time graph (2nd derivative). Next it is necessary to calculate the minimum of this curve. How do I find the derivative of the entire Y column to generate the new plot and then do I calculate the minimum with fminbnd? Thank yo.

Best Answer

Use the gradient function to calculate the first derivative, the del2 function to calculate the second derivative, and the min function to find the minimum.