Effacer les filtres
Effacer les filtres

Computing Sliding Window DFT on a digital sequece

2 vues (au cours des 30 derniers jours)
SUBHAJIT KAR
SUBHAJIT KAR le 3 Juin 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?

Réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by