I am beginning in signal processing and my professor is asking me to do a first differences filter to my timeserie. I know I am supposed to use the filter() function but I don’t know what numerator (b) and denominator (a) coefficient vectors am I supposed to use. Is first differences and first-order the same ?
Share
First, you should read up on Matlab’s documentation of the filter function. If you just want to take a first difference, what you’re looking to generate is the series:
Which corresponds to the vector a = 1, and b = [1, -1], so your Matlab code would look like: