Skip to content

Instantly share code, notes, and snippets.

@fetburner
Created July 13, 2014 05:34
Show Gist options
  • Select an option

  • Save fetburner/f22c2d16848cff0d4532 to your computer and use it in GitHub Desktop.

Select an option

Save fetburner/f22c2d16848cff0d4532 to your computer and use it in GitHub Desktop.
ディジタル信号処理レポート
x = wavread("./WonChuKissMe.wav");
N = 255;
n = 0:N - 1;
subplot(2, 1, 1);
plot(n, x(1:N)); grid;
title('Input signal x(n)'); xlabel('time n'); ylabel('x(n)');
h = [0.0464, 0.1522, 0.2037, 0.2536, 0.2037, 0.1522, 0.0464];
y = filter(h, 1, x);
subplot(2, 1, 2);
plot(n, y(1 : N)); grid;
title('Output signal y(n)'); xlabel('time n'); ylabel('y(n)');
wavwrite(y, "./WonChuKissMe_filtered.wav")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment