clear all;
%Read in the wav file and the sample rate
[x, Fs] = audioread('movieaudio.wav');
%Display the sample rate on the command line. We need this for the
%convolution to work. The integrand will use 1/Fs
Fs;
%Play the sound out the computer speaker
sound(x,Fs)
function y = SA(x)
% Trying to Create a Brickwall Filter but can't figure it out
% File: SA.M
% CALL: y = SA(x)
% This function computes sin(x)/x.
% x is assumed to be a "scalar" or a vector;
x = x(:);
y = zeros(length(x),1);
for i = 1:length(x)
if (x(i) == 0)
y(i) = 1;
else
y(i) = sin(x(i))/x(i);
end
end
% After filter is created I need to do convolution