I also decided to use filtfilt which works. I just wanted to figure out why filter didn't work the way I originally expected. For the sake of the community I'm glad that I managed to figure it out. At the very bottom of the help of filter filter delay (z) is defined. For y(1) the equation is: y(1)=b1*x(1)+z1(0), for the recursive exponential filter I wanted to implement b(1)=alpha, therefore y(1)=alpha*x(1)+z1(0) If I want y(1) to be equal to x(1): x(1)=alpha*x(1)+z1(0) solving for z1(0) yields z1(0)=x1*(1-alpha)
If I use the following command: filter([alpha 0],[1 alpha-1],data,data(1)*(1-alpha));
I get the x(1) for y(1).