フィルターのクリア

How can Overlap-add technique be done

12 ビュー (過去 30 日間)
Ijeoma Madu
Ijeoma Madu 2012 年 12 月 17 日
Hi:), I would like to perform the overlap-add technique but it seems to have errors. any ideas
load handel
N=length(y);
L=8192;
b=[0.2];
a=[1 -0.8];
[hn,t]=impz(b,a);
M=length(hn);
Nx=floor((N+M-1-1))/(L)
H = fft(hn,N) %% (zero-padded FFT)
i = 1
while i <= Nx
il = min(i+L-1,Nx)
wt = ifft( fft(y(i:il),N) .* H, N);
k = min(i+N-1,Nx);
w(i:k) = w(i:k) + wt ; %%(add the overlapped output blocks)
i = i+L;
end
  2 件のコメント
Walter Roberson
Walter Roberson 2012 年 12 月 17 日
What errors do you perceive?
Note: you might want to consider using "for" instead of "while"
Ijeoma Madu
Ijeoma Madu 2012 年 12 月 17 日
編集済み: Ijeoma Madu 2012 年 12 月 17 日
Thanks Walter. i get this error and not so sure what this means
Undefined function or method 'w' for input arguments of type 'double'.
Error in ==> asp2 at 20 w(i:k) = w(i:k) + wt ; %%(add the overlapped output blocks)

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2012 年 12 月 17 日
Initialize your matrix w, with
w = zeros(1,Nx);
before you start the loop.
  1 件のコメント
Ijeoma Madu
Ijeoma Madu 2012 年 12 月 17 日
Thanks

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by