# N'-band channelizer (filter bank) via Sliding FFT

I'm trying to figure out how to perform N'-band channelizer for SSCA (strip spectral correlation analyzer) via sliding FFT. I understand that I have to take $$N$$ points of signal in time domain $$x(t)$$, apply a windowing function and take another $$N$$ points by shifting the window by $$L$$ ($$L=1$$ in my case). Then I apply Fourier transform to those points. But how many of those windowed vectors do I need? I tried to follow code in commP25ssca.m but I can't understand steps between the final result (and then can't set proper input values to the mentioned function).

clc
clear all
close all
ef = 0.1;
ef_vz = 1;
Td = 1000;
time = 0:1/ef_vz:Td;
freq = 0:1/Td:ef_vz;
sig = 1*exp(1j*2*pi*ef.*time);
spek = abs(fft(sig));
N = 512;
num_blocks = floor((length(sig)-N) / 1);
x = sig;
counter = 0;
for i = 1:length(x)

k = [i:i+N-1];
window = x(k);
if i == 1
Xk(i,:) = fft(x(k));
else
Xk(i,:) = (Xk(i-1,:)-x(i)+x(i+N-1)).*exp((1j*2*pi*(k-1))/N);
end
counter = counter + 1;
if counter == 1
break
else
continue
end

end
p = linspace(0,ef_vz,N);
figure(1)
plot(p,abs(Xk))


I guess I've solve this problem by using part of steps described in blog about FAM estimator (steps 1.-3.).
https://cyclostationary.blog/2018/06/01/csp-estimators-the-fft-accumulation-method/

Also De Costa paper which is related with commP25ssca.m function helped me a lot. I think to obtain SSCA I need implement these two figures:

https://imgur.com/a/cUHElcO

https://imgur.com/a/Fwqp5kk

Here is code if somebody will need it:

Np = 64;
N = 32768;

input = xx(1:N);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%      N'point data to sublock

xbuff = [input, zeros(1,Np)];
subblock = zeros(Np,N);
for i = 1:Np
subblock(i,:) = xbuff(i:i+N-1);
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%      Apply window function and FFT

a = hamming(Np);
X = zeros(Np,N);
for j = 1:N
X(:,j) = fft(a.*subblock(:,j));
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%      Phase shifting

E = zeros(Np,N);

for idxl = -Np/2:Np/2-1    % length of l is Np
for k = 0:N-1          % length of k is P
E(idxl+Np/2+1,k+1) = exp(-1j*2*pi*k*idxl/Np);
end
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

XT = X.*E;

ReferBin = ones(Np,1)*input;
Xtx = XT.*conj(ReferBin);

SX = zeros(Np,N);
for i = 1:Np
SX(i,:) = fft(Xtx(i,:));
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%