フィルターのクリア

Computing Sliding Window DFT on a digital sequece

2 ビュー (過去 30 日間)
SUBHAJIT KAR
SUBHAJIT KAR 2019 年 6 月 3 日
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?

回答 (0 件)

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by