function [ params ] = fftparams( sa, nsecs, Fs )
%fft parameters, sa: input signal, tsec: sectioning time, 
%   Detailed explanation goes here
params=[];

bandpassfilter_struct =...
 design(fdesign.bandpass('n,f3dB1,f3dB2',8,100,2000,Fs),'butter');

fftfilter=[.25 .5 .25];
fmax=3000;

sa= filter(bandpassfilter_struct, sa);

salen = length(sa);
slen = floor(salen/nsecs);

for i=0:nsecs-1
    
    sbgn = i*slen+1;
    send = (i+1)*slen;
    s = sa(sbgn:send);
    
    f = 0 : Fs/(length(s)-1) : fmax;
    sfft = abs(fft(s));
    fsfft=filter(fftfilter,1,sfft);
    
    [pks, locs] = findpeaks(fsfft(1:length(f)), 'SORTSTR', 'descend','minpeakdistance',3);
    try
        locs = locs(1:5);
        pks = pks(1:5);
    catch
        locs = [0 0 0 0 0];
        pks = [0 0 0 0 0];
    end

    params = [params reshape([locs;pks],1,[]) ];
    %params = [params locs'];
end

