Homework (6).m

# Homework (6).m - jnane Abdelhamid homework#6 Fall 2007 BME...

This preview shows pages 1–3. Sign up to view the full content.

% jnane Abdelhamid % homework#6 % Fall 2007 % BME 505 T=2; l=0:5 b=exp(-l./T); subplot (2,2,1);plot(b);stem(b); xlabel ('h') ylabel('exp') title ('b function') x=zeros(100,1); x(10)=1; subplot (2,2,2);plot(x); title ('imput responde') b=filter(b,1,x); magh=abs(fft(h)); angleh=angle(fft(h)); subplot (2,2,3);plot (db(magh)) xlabel ('frequency(hz)') ylabel('magnetude(db)') title ('frequency domain response') subplot (2,2,4),plot(angleh,'g') xlabel ('frequency(hz)') ylabel('phase') title ('frequency domain response') %--------------------------------------% b=1; a=[1 -0.5]; x=zeros(100,1); x(10)=1; y=filter(b,a,x); subplot (2,2,1);plot([x y]);stem([x y]); xlabel ('X'); ylabel('Y'); title ('impulse response'); y=filter(b,a,x)% impulse respond subplot (2,2,2);plot(db(abs(fft(h))));xlim([0 51]); xlabel ('frequency(hz)'); ylabel('magnetude(db)'); title ('frequency domain response'); subplot (2,2,3);plot(angle(fft(h))/pi*180);xlim([0 51]); xlabel ('frequency(hz)'); ylabel('angle'); title ('frequency domain response'); % question # 2, t=0:0.01:1 f=5 x=sin(2*pi*f*t) y=filter(b,1,x) plot(t,x) hold on plot(t,y) %question # 3 b=1;

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
a=[1 -0.5]; x=zeros(100,1); x(10)=1; y=filter(b,a,x); subplot (2,2,1);plot([x y]);stem([x y]); xlabel ('X'); ylabel('Y'); title ('impulse response'); y=filter(b,a,x)% impulse respond
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern