I have defined a model of displacement 'x' and represented its first derivative with 'v' using the code below. However, when I want to differentiate 'v' using the same function it does not work. Is there a different approach to differentiating derivatives in MATLAB? here is the code:
h = 60 ; b =130 ; r = 28 ; w = 2*pi; % angular velocity
t =0:(1/36):1 ; x = b*(r*sin(w*t))./(h-r*cos(w*t));v = diff(x)./diff(t) ; % derivative of x w.r.t t
a = diff(v)./diff(t) ; % derivative of v w.r.t t
Best Answer