The FFT plot of my Signal does not Exhibit Clear Spikes as Expected.
2 次查看(过去 30 天)
显示 更早的评论
I have collected some fluorescence time series data from some cortical cells. Let's consider a single cell, where the data is described by a row vector. In our case it is described by the signal variable. A low pass filter has been applied. The cutoff frequency in such a case is close to 1Hz. I used the code that follows to filter and create the power spectrum of the data. From my understanding, this would allow me to see the rate with which the cell fires which is supposed to be constant and be shown as a single spike after applying the FFT algorithm, but I get a messy spectrum with quite a lot of spikes, out of which none seems very prominent.
Wn=1;
n=2;
ftype='low';
[b,a]=butter(n,Wn/(Fs/2),ftype);
dataF=filtfilt(b,a,signal);
figure();
subplot(221); plot(signal);
subplot(222); plot(dataF);
F=fft(signal); L=length(signal);
P2=abs(F/L);
P1=P2(1:L/2+1);
P1(2:end-1)=2*P1(2:end-1);
f=Fs*(0:(L/2))/L;
subplot(223); plot(f,P1);
![mat.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/194929/mat.png)
2 个评论
Aquatris
2018-11-14
Try to do the fft without filtering the signal. Maybe your filter is too agressive.
Another thing is use logarithmic scale. Instead of plot(), use semilogy().
Lastly, maybe your data is not what you think it is. There might be measurement errors, corrupted signals etc.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!