


r = DERIV_LINE(r,fsamp,filt) differentiation with the option to filter.
ARGUMENTS
r ... Matrix data (n x 1 or n x3)
fsamp ... Sampling rate of signal
filt ... Filter options (boolean)
filt = 0 or false: do not filter (default)
filt = 1 or true: filter data using 4th ord butt low-pass with 10 Hz cutoff
filt = struct: filter according to struc fields (see bmech_filter)
RETURNS
r ... Differentiated matrix data
NOTES
- use the following example to test the differentiation method
t = (0:0.001:1)';
x = sin(2*pi*t);
dx1 = 2*pi*cos(2*pi*t);
dx2 = deriv_line(x,1000,0);
plot(dx1)
hold on
plot(dx2,'r')
See also bmech_deriv, deriv_data, gradient, filter_line