I do 8192 samples at a time when I run it..
Code: Select all
% read bladeRF-cli output.csv file and plot a FFT of the samples
% assumes input file is ./output.csv from bladeRF
% load file (edit filename as needed)
% loads into a variable call output.
load( "-ascii", "output.csv" );
%get number of samples
n = size( output )(1,1)
% combine columns I and Q into I + jQ complex number
for i = 1:n
samples(i) = output(i,1) + output(i,2)*1i;
endfor
% build high pass filter to move DC component.
[b, a] = cheby2( 4, 80, 0.001, 'high' );
filtered_samples = filter(b,a,samples);
% ok we now have samples.. compute FFT
Complex_FFT = fft( filtered_samples );
% plot
plot( 1:n , Complex_FFT );