1 / 10

>> t=-4:0.01:4; xt=abs(t)<=1; >> w=-8*pi:0.01:8*pi; Xw=sinc(w/2/pi);

>> t=-4:0.01:4; xt=abs(t)<=1; >> w=-8*pi:0.01:8*pi; Xw=sinc(w/2/pi); >> subplot(1,2,1);plot(t,xt); title('x(t)');axis([-4,4,-0.2 1.2]) >> subplot(1,2,2);plot(w,Xw); title('X(Omega)');. >> t=-8*pi:0.01:8*pi; xt=sinc(t/2/pi); >> w=-4:0.01:4; Xw=2*pi*(abs(w)<=1);

nysa
Download Presentation

>> t=-4:0.01:4; xt=abs(t)<=1; >> w=-8*pi:0.01:8*pi; Xw=sinc(w/2/pi);

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. >> t=-4:0.01:4; xt=abs(t)<=1; >> w=-8*pi:0.01:8*pi; Xw=sinc(w/2/pi); >> subplot(1,2,1);plot(t,xt); title('x(t)');axis([-4,4,-0.2 1.2]) >> subplot(1,2,2);plot(w,Xw); title('X(\Omega)');

  2. >> t=-8*pi:0.01:8*pi; xt=sinc(t/2/pi); >> w=-4:0.01:4; Xw=2*pi*(abs(w)<=1); >> subplot(1,2,1);plot(t,xt); title('x(t)');axis([-8*pi,8*pi,-1 6.5]) >> subplot(1,2,2);plot(w,Xw); title('X(\Omega)');

  3. >> w=-4*pi:0.001:4*pi; >> xw=exp(j*w)+2+3*exp(-j*w)+4*exp(-j*2*w)+5*exp(-j*3*w); >> subplot(2,1,1); plot(w/pi,abs(xw));title('|x(\omega)|') >> subplot(2,1,2); plot(w/pi,angle(xw));title('Phase of x(\omega)')

  4. >> w=-4*pi:0.001:4*pi; >> xw=exp(j*w)./(exp(j*w)-0.5); >> subplot(2,1,1); plot(w/pi,abs(xw));title('|x(\omega)|') >> subplot(2,1,2); plot(w/pi,angle(xw));title('Phase of x(\omega)')

  5. %script file to calculate DTFT of x(n)=(0.9exp(j*pi/3))^n,n=0:10 w=linspace(-4*pi,4*pi,1000); xw=zeros(size(w)); for n=0:10, xw=xw+exp(-j*w*n)*(0.9*exp(j*pi/3))^n; end subplot(2,1,1); plot(w/pi,abs(xw));title('|x(\omega)|');grid on subplot(2,1,2); plot(w/pi,angle(xw));title('Phase of x(\omega)');grid on

  6. >> w=0:0.001:pi; >> magH=1./sqrt(1.81-1.8*cos(w)); >> angH=-atan2(0.9*sin(w),1-0.9*cos(w)); >> subplot(2,1,1); plot(w/pi,magH);title('Magniture repsonse');grid on >> subplot(2,1,2); plot(w/pi,angH);title('Phase repsonse');grid on

  7. System frequency response

  8. FREQZ Digital filter frequency response. [H,W] = FREQZ(B,A,N) returns the N-point complex frequency response vector H and the N-point frequency vector W in radians/sample of the filter: given numerator and denominator coefficients in vectors B and A. The frequency response is evaluated at N points equally spaced around the upper half of the unit circle. If N isn't specified, it defaults to 512. [H,W] = FREQZ(B,A,N,'whole') uses N points around the whole unit circle. H = FREQZ(B,A,W) returns the frequency response at frequencies designated in vector W, in radians/sample (normally between 0 and pi). [H,F] = FREQZ(B,A,N,Fs) and [H,F] = FREQZ(B,A,N,'whole',Fs) return frequency vector F (in Hz), where Fs is the sampling frequency (in Hz). H = FREQZ(B,A,F,Fs) returns the complex frequency response at the frequencies designated in vector F (in Hz), where Fs is the sampling frequency (in Hz).

  9. >> b=[0.0181, 0.0543,0.0543,0.0181]; >> a=[1,-1.76,1.1829,-0.2781]; >> [H,W]=freqz(b,a); >> subplot(2,1,1); plot(W/pi,abs(H));title('Magnitude repsonse');grid on >> subplot(2,1,2); plot(W/pi,angle(H));title('Phase repsonse');grid on

More Related