task2 - %soundsc(x1, f_sample); figure; plot(t, x1);...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
%Script to generate the solutions for HW11 of ECE 301 %Purdue University, Fall 2010 %Daniel Aguiar clear close all clc %Set constants as specified duration=8; f_sample=44100; t = (((0-4)*f_sample+0.5):((duration-4)*f_sample-0.5))/f_sample; %Load radio [radio, f_sample, N] = wavread('radio.wav'); radio = radio'; %Construct the LPF h_lpf = sin(2*pi*1000*t)./(pi*t); %Objective 1 ************************************ h_bpf1 = sin(2*pi*5000*t)./(pi*t) - sin(2*pi*3000*t)./(pi*t); x1 = 2*ece301conv(h_lpf, ece301conv(h_bpf1, radio).*cos(2*pi*4000*t));
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: %soundsc(x1, f_sample); figure; plot(t, x1); axis([-2.28, -2.255, -0.08 0.08]); saveas(gcf, 'hw11_task2_objective1.eps'); close gcf; %Objective 2 ************************************ h_bpf2 = sin(2*pi*7500*t)./(pi*t) - sin(2*pi*5000*t)./(pi*t); x2 = 2*ece301conv(h_lpf, ece301conv(h_bpf2, radio).*cos(2*pi*6500*t)); %soundsc(x2, f_sample); figure; plot(t,x2); axis([-2.28, -2.255, -0.08 0.08]); saveas(gcf, 'hw11_task2_objective2.eps'); close gcf;...
View Full Document

This note was uploaded on 02/07/2011 for the course ECE 301 taught by Professor V."ragu"balakrishnan during the Fall '06 term at Purdue University.

Ask a homework question - tutors are online