hwB26 - ENEE 241 02* HOMEWORK ASSIGNMENT 26 Due Fri 04/11...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
HOMEWORK ASSIGNMENT 26 Due Fri 04/11 Single-step the MATLAB script below, keeping a figure window open. Answer questions (i)-(viii) . Print and submit the last two graphs, i.e., bar(n, real(X4)) and bar(n, real(X5)) , only . (Make sure that your MATLAB path includes a directory containing the M-files oshift.m and oflip.m .) n = (0:31).’ ; z = randn(size(n)) ; x = z + oflip(z) ; % see (i) below bar(n,x) ; X = fft(x) ; max(imag(X))/max(real(X)) % see (ii) below bar(n, real(X)) ; bar(n, imag(X)) ; X1 = fft(X) ; % see (iii) below y = z - oflip(z) ; bar(n, y) ; Y = fft(y) ; bar(n, real(Y)) ; bar(n, imag(Y)) ; max(real(Y))/max(imag(Y)) Y1 = fft(Y) ; % see (iv) below x2 = oshift(x,17) ; X2 = fft(x2) ; max(imag(X2))/max(real(X2)) % see (v) below bar(n, abs(X2)) ; bar(n, cos(5*pi*n/16)) x4 = x.*cos(5*pi*n/16) ; X4 = fft(x4) ; max(imag(X4))/max(real(X4)) % see (vii) below bar(n, real(X4)) x5 = x.*sin(5*pi*n/16) ; X5 = fft(x5) ; max(imag(X5))/max(real(X5)) % see (viii) below bar(n, real(X5))
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/21/2010 for the course ENEE 241 taught by Professor Staff during the Spring '08 term at Maryland.

Page1 / 2

hwB26 - ENEE 241 02* HOMEWORK ASSIGNMENT 26 Due Fri 04/11...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online