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);

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!