フィルターのクリア

Tukey window in time domain

4 ビュー (過去 30 日間)
Sara Nasir
Sara Nasir 2020 年 9 月 13 日
I am trying to implement Tukey window in time domain. It is the rectangular filter where the edges are tapered by convolving a rectangular function with a cosine lobe.
given by formula:
I think I am doing something wrong here. Need help.
alpha = 0.5;
N = 2048;
Ts = 0.01;
time = -20: Ts: (N-1) * Ts; % -20sec t0 20sec
% rectangular window
x = zeros (size (time));
for n = 1: length (time)
if time (n)> - (1-alpha) / 2 && time (n) <(1-alpha) / 2
x (n) = 1;
end
end
figure (1)
plot (time, x);
% cosine window
y = zeros (size (time));
for n = 1: length (time)
if time (n)> = (1-alpha) / 2 && time (n) <= (1 + alpha) / 2
y = (1/2) + (1/2) * cos (pi / alpha (abs (time) - ((1-alpha) / 2)));
end
end
plot (time, y);
  1 件のコメント
Darshan Ramakant Bhat
Darshan Ramakant Bhat 2020 年 9 月 14 日
https://in.mathworks.com/help/signal/ref/tukeywin.html

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeOceanography and Hydrology についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by