Circadian analysis using FFT()
Show older comments
I need to get the power spectrum of gene expression data that were sampled every 4 hours for a 48 hour period (13 samples, including zero point). I did an initial analysis based on a sound recording example but I think I'm missing something.
This is the code I'm using:
signal = load('data.txt')
N = length(signal);
fs = 1/(4*60*60); %Samples per second
fnyquist = fs/2; %Nyquist frequency
X_mags = abs(fft(signal));
bin_vals = [0 : N-1];
fax_Hz = bin_vals*fs/N;
N_2 = ceil(N/2);
plot(fax_Hz(1:N_2), X_mags(1:N_2))
I want to know if there are frequencies associated with the period of the signals. This data should have a period around 24 hours.
Mike
Accepted Answer
More Answers (0)
Categories
Find more on Get Started with Signal Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!