Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
64aae1ebeThis file is pinned to the selected release. Download the original to open it in your design tool.
function f = kSerialFFT( f, data, freq, state )
if isequal(state, 'init')
grid(f.fig, 'on');
hold(f.fig, 'on');
axis(f.fig, f.window);
xlabel(f.fig, 'frequence (Hz)');
% ylabel(cube.fig, '| strength |');
f.plotBar = plot(0, 0);
else
data = fft(data);
P2 = abs(data / f.length);
P1 = P2(1 : f.length / 2 + 1);
P1(2 : end - 1) = 2 * P1(2 : end - 1);
freq = freq * (0 : (f.length / 2)) / f.length;
delete(f.plotBar);
f.plotBar = bar(freq, P1, 0.1);
drawnow
end
end