I think I've solved my own problem. The problem was the bizarre way MATLAB does FFT. I redid it with the following:
L=100000;
Fs=###;
w_filter=[-L/2:L/2-1]*Fs/L; % have to evaluate the function from -Fs/2:Fs/2-1
Z_lowpass = 1./ (1 + iw_filter*RC);
signal= ones(1,100000)...
Got a DSP problem. I think this is a bit complicated, and may need some DSP gurus to answer it. I've been banging my head on this literally for months now. Thought I had it figured out, but today find I'm still not done.
I have some Impedance spectroscopy data from electrodes, sampled at...