Computerexercise4-1 - 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

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

View Full Document Right Arrow Icon
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/ ( 2 ) ezplot (Xl) ( '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. / I WI wexpl--- 1 (-1/2 1) \ ( 4 ) ezplot(imag(X2)), % X2 is purely imaginary and so I will plot the imag part. ( 'Computer Exercise 4-1 (b) : Imag (X-2 (w) ) ) x2check=ifourier(X2) % 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.
Background image of page 1

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

View Full DocumentRight Arrow Icon
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) + + 3) pretty (X3) 1 ------- + - - - - - - - 2+wI 3+WI (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. ylabel( 'Computer Exercise 4-1 (c) : real (X-3 (w) ) ' ) figure (7) ezplot(imag(X3)) % Plot the imaginary component of X3.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/08/2009 for the course ECE 304 taught by Professor Ma during the Spring '08 term at University of Arizona- Tucson.

Page1 / 15

Computerexercise4-1 - 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

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

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