Hello everyone, I'm trying to high-filter a signal beacause when I perform a fft of the original signal I find a contribution at very low frequency even if I take the fft of detrend(signal). I want to cut out that contribution. I wrote this simple script:
Fcp=3; %cutoff frequency
[z,p,k]=butter(8,Fcp/(Fsp/2),'high');sos=zp2sos(z,p,k);%fvtool(sos,'Analysis','freq')
x101filtfilt=filtfilt(z,p,x101);figure;plot(t101,x101,t101,x101filtfilt);grid ontitle('PE101 (pressure signal)')xlabel('t (s)')ylabel('Pressure (kPa)')legend({'Original PE101 Signal','Actual PE101 Signal (filtered and realigned signal)'});
The sampling frequency is 600 Hz and the signal x101 is about 180 s long. I receive the error: "Warning: Imaginary parts of complex X and/or Y arguments ignored". As a matter of fact the new signal x101filtfilt contains imaginary numbers. Where am I wrong? Thank you very much.
Best Answer