%%% Script file for in-class 2 %%% %%% Assignment: %%% The following code generates a signal x containing an A and a C %%% that is several octaves above the A. %%% %%% x(t)=cos(2*pi*440*t)+cos(2*pi*2093.005*t) %%% A C %%% %%% Choose value for wc in following code so that the signal that %%% only the A signal is passed by the filter. wc is the cutoff %%% frequency of the DT filter. %%% %%% fs=8000; % sample frequency in Hz n=0:3*fs; % want 3 seconds of signal x=cos(2*pi*440/fs*n)+cos(2*pi*2093.005/fs*n); wc=.28*pi [b,a]=butter(6,wc/pi); y=filter(b,a,x); soundsc(y,fs)