{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

computerexercise4-1

# computerexercise4-1 - 5:13 PM C\Documents and...

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

10/8/09 5:13 PM C:\Documents and Settings\Tharp\My Documents\MAT~AB\ ...\ CE4 l.log 1 of 3 ce4-1, % Execute the commands in the 'ce4-1.m' M-file. echo on , % Display the commands and the command results. format compact, % Save space and paper by using the compact display mode. xl=sym('exp(-tA2) ' 1 % Symbolic entry of a time-domain waveform. xl = exp(-tA2) figure ( 1) ezplot(xl), % Exarnine the time domain behavior of xl(t) . ylabel ( 'Computer Exercise 4-1 (a) : x-1 (t) Xl=fourier(xl), % Display the Fourier Transform of xl(t). X1 = piA (1/2) /exp (wA2/4) pretty (XI) % Exarnine the Fourier Transform of xl (t ) using the I1pretty"format. / 2 \ 1/2 1 w I PI expl - - - I \ 4 / figure ( 2 ) ezplot (Xl) ylabel ( 'Computer ~xercise 4-1 (a) : X-1 (w) ) xlcheck=ifourier(Xl) % Verify the time-domain signal. xlcheck = l/exp (xA2) % Part (b) x2=sym( t*exp (-tA2) % Expression #2. x2 = t*exp(-tA2) figure (3) ezplot(x2), % Exarnine the time domain behavior of x2(t). ylabel(IComputer Exercise 4-1 (b) : x_2(t) I) X2=fourier (x2) X2 = -(piA(l/2)*i*w)/(2*exp(wA2/4)) pretty(X2), % Display a pretty version of X2. / 2 \ 1/2 I W I PI wexpl--- 1 (-1/2 1) \ 4 / figure ( 4 ) ezplot(imag(X2)), % X2 is purely imaginary and so I will plot the imag part. ylabel ( 'Computer Exercise 4-1 (b) : Imag (X-2 (w) ) ) x2check=ifourier(X2) % Verify the time-domain signal. x2check = x/exp (xA2) %Part (c) x3=sym(' (exp(-3*t)+exp(-2*t) ) *heaviside(t) I) x3 = (exp(-3*t) +exp(-2*t) *heaviside (t) % This version of Matlab did not like 'Heaviside(t) I.

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

View Full Document
10/8/09 5:13 PM C:\Documents and ~ettings\Tharp\~y ~ocuments\MA~~~~\ ...\ CE4 l.log 2 of 3 % It seemed to work with 'heaviside(t)' in the lowercase form. figure ( 5 ) ezplot(x3), % I wasn't real pleased with the 'ezplot' % graph of I1x3 " . ylabel(lComputer Exercise 4-1 (c): x_3(t)') X3=fourier (x3) X3 = l/(i*w + 2) + l/(i*w + 3) pretty (X3) 1 1 - - - - - - - + - - - - - - - 2 + w I 3 + W I figure ( 6 ) ezplot(real(X3)) % 'ezplotl did not like trying to plot X3 % so I tried to plot X3Is real component separate from its % imaginary component.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}