Borrar filtros
Borrar filtros

Computing Sliding Window DFT on a digital sequece

2 visualizaciones (últimos 30 días)
SUBHAJIT KAR
SUBHAJIT KAR el 3 de Jun. de 2019
Hi all,
I want to compute sliding window DFT of a numeric sequence. Hence I have written the code. Running the code showing an error as "Index exceeds matrix dimentions" error in x1 = x(i:i+351-1); x is the given sequence.
n = length(x);
n =1;
for i =1:1:n-1
x1 = x(i:i+351-1);
A = abs(fft(x1));
S = A.^2;
snr = max(S)/mean(S);
y(ceil(i/h)) = snr;
end
plot(y)
I want plot the snr values for every window length with respect to the index values. Any help will be appreciated. How to correct it?

Respuestas (0)

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by