matlab - First differences filter -
i beginning in signal processing , professor asking me first differences filter timeserie. know supposed use filter() function don't know numerator (b) , denominator (a) coefficient vectors supposed use. first differences , first-order same ?
first, should read on matlab's documentation of filter function. if want take first difference, you're looking generate series:
1 * y(n) = 1 * x(n) - 1 * x(n - 1)
which corresponds vector = 1, , b = [1, -1], matlab code like:
y = filter([1,-1],1,x);
Comments
Post a Comment