Perform the first and second derivatives of a vector.
[D,D2] = NL_F_Derivative12(X)
Time series.
First derivative.
Second derivative.
NL_F_Derivative12 performs the first D and second D2 derivatives of the vector X.
t=[0:0.1:30]; u=10*sin(t)+20*sin(2*t)+5*sin(3*t); u=u+3*t+50+0.7*(rand(1,length(t))-0.5); [d,d2]=NL_F_Derivative12(u);//application of NL_F_Derivative12 subplot(3,1,1); plot2d(t,u); subplot(3,1,2); plot2d(1:length(d),d); subplot(3,1,3); plot2d(1:length(d2),d2);