MATLAB: Finding the derivative of a graph

derivative

I have a 60×1 vector which i plotted against time (60 units). I want to determine the derivative of that graph. How do i do that

Best Answer

Example
t=0:0.1:10
y=t.^2
dy=gradient(y,t)
subplot(211);
plot(t,y)
subplot(212)
plot(t,dy)