DOC PREVIEW
PSU EE 350 - Rec_5_EE350_f14

This preview shows page 1-2-3-25-26-27-28-50-51-52 out of 52 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 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 52 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 52 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 52 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 52 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 52 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 52 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 52 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 52 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 52 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ColorGrayscale Jeffrey Schiano 2014. All rights reserved. Rec 5. EE 350Continuous-Time Linear SystemsRecitation 51 Jeffrey Schiano 2014. All rights reserved. Rec 5. Recitation 5 Topics• Solved Problems (Exam I Review)– Solution of ODEs– Stability• MATLAB Program Flow Control • Relational Operators– Logical Operators– Conditional Statements – For Loop– While Loop2 Jeffrey Schiano 2014. All rights reserved. Rec 5. Problem 1• A LTI system with input f(t) and output y(t) has the ODE representation1. Determine the roots of the characteristic equation and sketch the roots in the λ–plane2. State if the system is unstable, marginally stable, or unstable3. Determine the zero-state unit-step response4. Determine the zero-state response for f(t) = cos(t) u(t)3()yy ft  Jeffrey Schiano 2014. All rights reserved. Rec 5. Problem 1 Solution4 Jeffrey Schiano 2014. All rights reserved. Rec 5. Problem 1 Solution5 Jeffrey Schiano 2014. All rights reserved. Rec 5. Problem 1 Solution6 Jeffrey Schiano 2014. All rights reserved. Rec 5. Problem 1 Solution7 Jeffrey Schiano 2014. All rights reserved. Rec 5. Problem 1 Solution8 Jeffrey Schiano 2014. All rights reserved. Rec 5. Problem 2• A second-order LTI system has the following zero-state and zero-input responses for a given input f(t) and set of initial conditions• Determine1. The characteristic equation 2. The total response3. The natural response (homogeneous solution)4. The forced response (particular solution)5. The initial conditions9223() 2 0() 4 2 2 0ttzitt tzsyt e e tyt e e e t    Jeffrey Schiano 2014. All rights reserved. Rec 5. Problem 2 Solution10 Jeffrey Schiano 2014. All rights reserved. Rec 5. Problem 2 Solution11 Jeffrey Schiano 2014. All rights reserved. Rec 5. Relational Operators• Compare variable values and produce a result that is true (1) or false (0)• Example• The syntax of a relational expression is12>> x = 10; y = 20; % assign values to two variables>> z = x < y; % compare x < y1zleft expression relational operator right express Jeffrey Schiano 2014. All rights reserved. Rec 5. List of Relational Operators13Relational Operator Description< Less than<= Less than or equal to> Greater than>= Greater than or equal to== Equal to~= Not equal to Jeffrey Schiano 2014. All rights reserved. Rec 5. Problem 3• Determine the results of the following expressions– verify using MATLAB14>> a = -1; b = 2; c = 3; d = 4; >> e = a^2 + b^2 >= c^2 + d^2e =f = (b > a) + 2*(c < d)f = >> x = [0, 2, 4, 6, 8]; y = [1, -1, 8, 2, 8];>>g = x > 3g =>> h = x >= yh = Jeffrey Schiano 2014. All rights reserved. Rec 5. Logical Operators• Logical operators work on logical variables and yield a logical value (0 or 1)• Use parentheses to control the order of evaluation• Logical operators work on with numbers– The number 0 is used as logical 0– A nonzero number is used as logical 115Logical Operator Description&AND|ORxor(a,b) Exclusive OR (XOR)~NOT Jeffrey Schiano 2014. All rights reserved. Rec 5. Short-Circuit Logical Operators• Evaluate the second operand only when the result is not fully determined by the first operand• Examples– If A = 0, then MATLAB will not evaluate B when determining A && B– If A = 1, then MATLAB will not evaluate B when determining A || B16Logical Operator Description&& Short-circuit Logical AND|| Short-circuit Logical OR Jeffrey Schiano 2014. All rights reserved. Rec 5. Problem 4• Determine the results of the following expressions– verify using MATLAB17>> a = 0; b = 1; c = pi; >> b & cans =a | bans = >> xor(b,c)ans =>>~cans = Jeffrey Schiano 2014. All rights reserved. Rec 5. The if-end Structure• Simplest if structure • If the expression is true the block of statements is executed, otherwise the block of statements is skipped and execution continues after the end statement18if expressionblock of statementsend Jeffrey Schiano 2014. All rights reserved. Rec 5. The if-else-end Structure• Provides a means for choosing among two blocks of statements to execute• If the expression is true, statements in block #1 execute• If the expression is false, statements in block #2 execute19if expressionblock #1 of statementselseblock #2 of statementsend Jeffrey Schiano 2014. All rights reserved. Rec 5. The if-elseif-else-end Structure• Most general if structure 20if expression 1block #1 of statementselseif expression 2block #2 of statementselseblock #N of statementsend Jeffrey Schiano 2014. All rights reserved. Rec 5. Problem 5• Determine x, verify using MATLAB2110;>> if (x < -2) || (x > 2), x = 2*sign(x); endxxx  4;>> if x > 0, x=sqrt(x);else^2;endxxxxx  Jeffrey Schiano 2014. All rights reserved. Rec 5. For Loop• Repeats executing a block of statements a predetermined number of times• Syntax22for loop_index = first_index : index_increment : last_indexblock of statementsend Jeffrey Schiano 2014. All rights reserved. Rec 5. Problem 6• Consider the row vector x and column vector y• Use a For Loop to determine the product xy– Measure the execution time using the tic and tocfunctions – use MATLAB help to determine the syntax• Determine the product using a command line multiply– Measure the execution time• Which approach is faster?23x = ones(1,10000); y = ones(10000,1)  Jeffrey Schiano 2014. All rights reserved. Rec 5. Problem 6 Solution24 Jeffrey Schiano 2014. All rights reserved. Rec 5. While Loop• Repeats executing a block of statements until an expression is no longer true• Syntax25while expression block of statementsend Jeffrey Schiano 2014. All rights reserved. Rec 5. Problem 7• Use a While Loop to display 20,21,.., 2N, where the integer N ≥ 0• Verify using MATLAB26 Jeffrey Schiano 2014. All rights reserved. Rec 5. EE 350Continuous-Time Linear SystemsRecitation 51 Jeffrey Schiano 2014. All rights reserved. Rec 5. Recitation 5 Topics• Solved


View Full Document

PSU EE 350 - Rec_5_EE350_f14

Documents in this Course
ps11

ps11

6 pages

ps10_soln

ps10_soln

20 pages

ps10

ps10

5 pages

ps9_soln

ps9_soln

19 pages

ps9

ps9

4 pages

ps8_soln

ps8_soln

19 pages

ps8

ps8

5 pages

ps7_soln

ps7_soln

22 pages

ps7

ps7

4 pages

ps6_soln

ps6_soln

27 pages

ps6

ps6

5 pages

ps5_soln

ps5_soln

25 pages

ps5

ps5

7 pages

ps4_soln

ps4_soln

20 pages

ps4

ps4

5 pages

ps3_soln

ps3_soln

27 pages

ps3

ps3

6 pages

ps2_soln

ps2_soln

24 pages

ps2

ps2

5 pages

ps1_soln

ps1_soln

17 pages

ps1

ps1

5 pages

ps11_soln

ps11_soln

28 pages

examI_s04

examI_s04

16 pages

examI_s03

examI_s03

10 pages

examI_s02

examI_s02

12 pages

examI_s01

examI_s01

13 pages

examI_f99

examI_f99

15 pages

examI_f14

examI_f14

26 pages

examI_f11

examI_f11

26 pages

examI_f10

examI_f10

26 pages

examI_f09

examI_f09

26 pages

examI_f08

examI_f08

13 pages

examI_f07

examI_f07

11 pages

examI_f03

examI_f03

11 pages

examI_f02

examI_f02

14 pages

examI_f01

examI_f01

15 pages

examI_f00

examI_f00

14 pages

final_s99

final_s99

16 pages

final_s97

final_s97

13 pages

final_s04

final_s04

30 pages

final_s03

final_s03

12 pages

final_s02

final_s02

14 pages

final_s01

final_s01

14 pages

final_s00

final_s00

17 pages

final_f99

final_f99

16 pages

final_f98

final_f98

16 pages

final_f11

final_f11

40 pages

final_f10

final_f10

32 pages

final_f09

final_f09

32 pages

final_f08

final_f08

26 pages

final_f07

final_f07

26 pages

final_f03

final_f03

12 pages

final_f02

final_f02

14 pages

final_f01

final_f01

14 pages

final_f00

final_f00

16 pages

examI_s99

examI_s99

13 pages

Load more
Download Rec_5_EE350_f14
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 Rec_5_EE350_f14 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 Rec_5_EE350_f14 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?