DOC PREVIEW
WVU EE 327 - MATLAB WORKSHOP

This preview shows page 1-2-16-17-18-34-35 out of 35 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

MATLAB WORKSHOPSlide 2CLS-MATLAB FilesUnit Step Function (Figure 1.7a text)%F1_7b Signal g(t) multiplied f(101:501)=2.5-cos(5*t(101:501) by a pulse functions ([u(t+1)-u(t-3)]%F1_7b Signal g(t) multiplied by a pulse functionsSequencesReal Exponential SequencesSinusoidal SequenceExponentially Modulated Sinusoidal SequenceSlide 11Slide 12MATLAB BasicsSlide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24Slide 25Slide 26Slide 27Slide 28Slide 29Slide 30Slide 31Slide 32Slide 33Slide 34Slide 35MATLAB WORKSHOPMATLAB WORKSHOPMATLAB WORKSHOPMATLAB WORKSHOP•FOR EE 327FOR EE 327•MWF 8:00-850 AMMWF 8:00-850 AM•August 26-30, 2002August 26-30, 2002Dr. Ali A. JalaliDr. Ali A. JalaliMATLAB WORKSHOPMATLAB WORKSHOPMATLAB WORKSHOPMATLAB WORKSHOPWORKSHOPWORKSHOPWebPagesWebPageswww.csee.wvu.edu/~jalaliwww.csee.wvu.edu/~jalaliCLS-MATLAB FilesCLS-MATLAB FilesCLS-MATLAB FilesCLS-MATLAB FilesTextbook MATLAB Files for Download : http://www.csee.wvu.edu/~jalalihttp://www.brookscole.com/engineering/ee/bookware.html•Macintosh and MS-Windows Versions•A For Answers of problems•E For Examples•F For Figures•P For Problems•Follows by a one or two-digit number 1 through 11 corresponding to the chapter. •The final characters indicate the number of the appropriate answer.•(A8_16) Answer for problem 16 Chapter 8•(E7_4) Example 4 in chapter 7 (%E7_4 Filter outputs using convolution)•(F4_2) Figure 4 in Chapter 2•(P8_20) Problem 20 in Chapter 8Textbook MATLAB Files for Download : http://www.csee.wvu.edu/~jalalihttp://www.brookscole.com/engineering/ee/bookware.html•Macintosh and MS-Windows Versions•A For Answers of problems•E For Examples•F For Figures•P For Problems•Follows by a one or two-digit number 1 through 11 corresponding to the chapter. •The final characters indicate the number of the appropriate answer.•(A8_16) Answer for problem 16 Chapter 8•(E7_4) Example 4 in chapter 7 (%E7_4 Filter outputs using convolution)•(F4_2) Figure 4 in Chapter 2•(P8_20) Problem 20 in Chapter 8Unit Step Function (Figure 1.7a text)%F1_7a Unit step functiont=-2:0.01:5; % make t a vector of 701 pointsq=size(t);f=zeros(q(1),q(2)); % set f = a vector of zerosq=size(t(201:701));f(201:701)=ones(q(1),q(2));% set final 500 points of f to 1plot(t,f),title('Fig.1.7a Unit step function');axis([-2,5,-1,2]); % sets limits on axesxlabel('time, t');ylabel(' u(t)');grid;%F1_7a Unit step functiont=-2:0.01:5; % make t a vector of 701 pointsq=size(t);f=zeros(q(1),q(2)); % set f = a vector of zerosq=size(t(201:701));f(201:701)=ones(q(1),q(2));% set final 500 points of f to 1plot(t,f),title('Fig.1.7a Unit step function');axis([-2,5,-1,2]); % sets limits on axesxlabel('time, t');ylabel(' u(t)');grid;.0)(00ottifttifBttBuGeneric stepfunctionEE 327 fall 2002%F1_7b Signal g(t) multiplied f(101:501)=2.5-cos(5*t(101:501) by a pulse functions ([u(t+1)-u(t-3)]%F1_7b Signal g(t) multiplied by a pulse functionst= -2:0.01:5;q=size(t);f=zeros(q(1),q(2));f(101:501)=2.5-cos(5*t(101:501));plot(t,f),title('Fig.1.7b Signal g(t) multiplied by a pulse functions');axis([-2,5,-1,4]);xlabel('time, t');ylabel(' g(t)[u(t+1)-u(t-3)]');grid; %F1_7b Signal g(t) multiplied by a pulse functionst= -2:0.01:5;q=size(t);f=zeros(q(1),q(2));f(101:501)=2.5-cos(5*t(101:501));plot(t,f),title('Fig.1.7b Signal g(t) multiplied by a pulse functions');axis([-2,5,-1,4]);xlabel('time, t');ylabel(' g(t)[u(t+1)-u(t-3)]');grid; EE 327 fall 2002%F1_7b Signal g(t) multiplied by a pulse functionsEE 327 fall 2002Sequences1. Ramp Sequence2. A shifted ramp sequence with slop of B is defined by:3. The unit ramp sequence and shifted ramp sequences4. Example: g(t) = 2(n-10). )()(0nnBng MATLAB Code:n=-10:1:20;f=2*(n-10);stem(n,f);MATLAB Code:n=-10:1:20;f=2*(n-10);stem(n,f);EE 327 fall 2002Real Exponential Sequences1. Real exponential sequence is defined as: Example for A = 10 and a = 0.9, as n goes to infinity the sequence approaches zero and as n goes to minus infinity the sequence approaches plus infinity. naAnf )()( EE 327 fall 2002)()()( nuaAnpnComposite sequence:Multiplying point byPoint by the step sequenceMATLAB Code:n=-10:1:10;f =10*(.9).^n;stem(n,f);axis([-10 10 0 30]);Sinusoidal Sequence1. A sinusoidal sequence may be described as:2. Where A is positve real number (amplitude), N is the period, and a is the phase. 3. Example: 4. A = 5, N = 16 5. And6. MATLAB Code:7. n=-20:1:20;8. f=5*[cos(n*pi/8+pi/4)]; 9. stem(n,f);NnAnf2cos)(EE 327 fall 2002.4/aExponentially Modulated Sinusoidal Sequence1. By multiplying an exponential sequence by sinusoidal sequence, we obtain an exponentially modulated sequence described by:2. Example: 3. A = 10, N = 16, a = 0.91. MATLAB Code:2. n=-20:1:20;3. f=10*[0.9 .^n];4. g=[cos(2*n*pi/16+pi/4)];5. h=f .*g;6. stem(n,h);7. axis([-20 20 -30 70]);NnaAngn2cos)()(EE 327 fall 2002.4/MATLAB WORKSHOPMATLAB WORKSHOPMATLAB WORKSHOPMATLAB WORKSHOPLecture # 1Lecture # 1Monday August 26Monday August 26•IntroductionIntroduction•MATLAB DemosMATLAB Demos•MATLAB BasicsMATLAB Basics Lecture # 2Lecture # 2Wednesday August 28Wednesday August 28•MATLAB BasicsMATLAB Basics•MATLAB PlotsMATLAB Plots•MATLAB ExamplesMATLAB Examples Lecture # 3Lecture # 3Friday August 30Friday August 30•MATLAB FundationMATLAB Fundation•Textbook ExamplesTextbook Examples•Short QuizShort QuizMATLAB WORKSHOPMATLAB WORKSHOPMATLAB WORKSHOPMATLAB WORKSHOP•Lecture # 2Lecture # 2•Wednesday August 28Wednesday August 28•MATLAB BasicsMATLAB Basics•MATLAB PlotsMATLAB Plots•MATLAB ExamplesMATLAB ExamplesMATLAB BasicsMATLAB BasicsMATLAB BasicsMATLAB BasicsContentsContents•Numbers and FormatNumbers and Format•Command Line HelpCommand Line Help•VariablesVariables•Vectors and MatricesVectors and Matrices•Plotting Elementary FunctionsPlotting Elementary Functions•Loading and Saving Loading and Saving •M-FilesM-Files•Loops and If StatementsLoops and If Statements•User Defined VariableUser Defined VariableContentsContents•Numbers and FormatNumbers and Format•Command Line HelpCommand Line Help•VariablesVariables•Vectors and MatricesVectors and Matrices•Plotting Elementary FunctionsPlotting Elementary Functions•Loading and Saving Loading and Saving •M-FilesM-Files•Loops and If StatementsLoops and If Statements•User Defined VariableUser Defined VariableMATLAB BasicsMATLAB


View Full Document

WVU EE 327 - MATLAB WORKSHOP

Documents in this Course
Load more
Download MATLAB WORKSHOP
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view MATLAB WORKSHOP and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view MATLAB WORKSHOP 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?