I want to take FFT of 10 measurements. That means I have 10 rows in my data with each row having dimension [1*2000]. In the code below, I am doing in a wrong way. Can anybody tell me what mistake I am making?
load('fb2010'); % loading the data
x = fb2010(3:1:15,:);
y_filt = filter(b,a,x); % filtering the received signal
%%%%%%% Fourier transform
nfft = length(y_filt);
for i = 1:10
res(i,:) = fft(y_filt(i,:),nfft)/ nfft; %%%% Taking first fft and normalizing it
end
res2 = res(:,1:nfft/2+1); %%%% taking single sided spectrum
f = fs/2*linspace(0,1,nfft/2+1); % choosing correct frequency axes
figure, plot(f,abs(res2));