56 Pages

flow (2)

Course: CSCE 206, Spring 2011
School: Texas A&M
Rating:
 
 
 
 
 

Word Count: 2104

Document Preview

of Flow Control True and False in C Conditional Execution Iteration Nested Code(Nested-ifs, Nested-loops) Jumps 1 True and False in C False is represented by any zero value. The int expression having the value 0. The floating expression having the value 0.0. The null character \0. The NULL pointer (for pointer see chap. 8). True is represented by any nonzero value. A logical expression, such as...

Register Now

Unformatted Document Excerpt

Coursehero >> Texas >> Texas A&M >> CSCE 206

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
of Flow Control True and False in C Conditional Execution Iteration Nested Code(Nested-ifs, Nested-loops) Jumps 1 True and False in C False is represented by any zero value. The int expression having the value 0. The floating expression having the value 0.0. The null character \0. The NULL pointer (for pointer see chap. 8). True is represented by any nonzero value. A logical expression, such as a<b, is either true or false. This expression yields the int value 1 if it is true or the int value 0 if it is false. 2 Examples int i=1, j=2, k=3; double x=5.5, y=7.7, z=0.0; i<j-k i<(j-k) -i+5*j>=k+1 ((-i)+(5*j))>=(k+1) x-y<=j-k-1 (x-y)<=((j-k)-1) x+k+7<y/k ((x+k)+7)<(y/k) i!=j !!5 !(!5) !i-j+4 ((!i)-j)+4 x||i&&j-2 x||(i&&(j-2)) 0 1 1 0 1 1 2 1 3 Selection if switch 4 if statement Conditional Execution: if (Boolean expression) statement; else statement; Where a statement may consist of a single statement, a code block, or empty statement. The else clause is optional. 5 if logic: If-else-logic: if (Boolean Expression) statement_1; YesFor a Semi-colon if (Boolean Expression){ compound_1 } No Semi-colon else{ compound_2 } Conditional execution allows you write code that reacts to tested conditions. 6 Example #include <stdio.h> WHY? int main ( ) { double salary, payrate; int hours, union; printf (Please enter hours worked, payrate, and union status); 7 printf (Enter 1 if a union member, 0 if not); scanf (%d%lf%d, &hours, &payrate, &union); if (hours > 40 && union = = 1) salary = (40 * payrate) + ((1.5 * payrate) * (hours - 40)); else salary = payrate * hours; printf (Salary is: $ % 6.2 f, salary); } 8 Nested ifs Nested: Nested ifs: One statement coded within another statement. An nested if is an if that is the target of another if or else. Why Nested ifs? Needed to handle tasks where we have 3 or More options that are mutually exclusive. ANSI C specifies that at least 15 levels of nesting must be supported by the compiler. 9 The if-else-if ladder Linear nested If General form: OLD STYLE if (expression) statement; else if (expression) statement; else if (expression) statement; . . . else statement; 10 The conditions are evaluated from the top downward. As soon as a true condition is found, the statement associated with it is executed and the rest of the ladder is bypassed. If none of the conditions are true, the final else is executed. That is, if all other conditional tests fail, the last else statement is performed. If the final else is not present, no action takes place if all other conditions are false. 11 Example E.g. You are a salesperson for the Widget Manufacturing Co. You will earn a salary bonus according to the following rules: Sales > = $50,000 Sales > = $100,000 Sales > = $150,000 earn $5,000 earn $15,000 earn $30,000 12 double sales, bonus; printf (please enter total sales); scanf (%lf, &sales); if (sales < 50000) bonus = 0; else if (sales < 100000) bonus = 5000; else if (sales < 150000) bonus = 15000; else bonus = 30000; 13 In a nested if, an else always refers to the nearest if that is within the same block as the else and that is not already associated with an else. if(i) { if(j) dosomething1(); if(k) dosomething2(); /* this if */ else dosomething3(); /* goes with this else */ } else dosomething4(); /* associated with if(i) */ 14 Conditional Expression The expressions must simply evaluate to either a true or false (zero or nonzero) value. The expressions are not restricted to involving the relational and logical operators. 15 The ?: Alternative Exp1 ? Exp2: Exp3 x = 10; y = x>9 ? 100 : 200; x = 10; if(x>9) y = 100; else y = 200; 16 #include <stdio.h> int f1(int n); int f2(void); int main(void) { int t; printf("Enter a number: "); scanf("%d", &t); t ? f1(t) + f2() : printf("zero entered."); printf("\n"); return 0; } 17 /* Divide the first number by the second. */ #include <stdio.h> int main(void) { int a, b; printf("Enter two numbers: "); scanf(''%d%d", &a, &b); if(b) printf("%d\n", a/b); VALID? else printf("Cannot divide by zero.\n"); return 0; } 18 switch statement switch is a multiple-branch selection statement, which successively tests the value of an expression against a list of integer or character constants (floating point expression, for example, are not allowed). When a match is found, the statements associated with that constant are executed. 19 General Form switch (expression) { case constant1: statementsequence break; case constant2: statementsequence break; . . default statementsequence } //ANSI C - at least 257 case constants. 20 Execution The value of the expression is tested against the constants specified in the case statements in a top-down order.. When a match is found, the statement sequence associated with that case is executed until the break statement or the end of the switch statement is reached. When break is encountered in a switch, program execution "jumps" to the line of code following the switch statement. The default statement is executed if no matches are found. 21 The default is optional. The switch differs from the if in that switch can only test for equality, whereas if can evaluate any type of relational or logical expression. No two case constants in the same switch can have identical values. Of course, a switch statement enclosed by an outer switch may have case constants that are in common. If character constants are used in the switch statement, they are automatically converted to integers (as is specified by C's type conversion rules). 22 The switch statement is often used to process keyboard commands, such as menu selection. The following function will when called: display the options, allow the user to make a selection, and then evoke the appropriate function to perform the task selected. void menu(void) { char ch; printf("1. Check Spelling\n"); printf(''2. Correct Spelling Errors\n"); printf("3. Display Spelling Errors\n"); printf("Strike Any Other Key to Skip\n"); printf(" Enter your choice: "); ch = getchar(); /* read the selection from the keyboard */ 23 switch(ch) { case '1': check_spelling (); break; case '2': correct_errors (); break; case '3': display_errors (); break; default : printf("No option selected") ; } 24 int flag, k; The break inside flag = -1; the switch is optional. /* Assume k is initialized */ switch(k) { case 1: /* These cases have common */ case 2: /* statement sequences. */ If the break is case 3: flag = 0; omitted, break; execution will case 4: continue on into flag = 1; the next case until case 5: either a break or error(flag); the end of the break; switch is reached. default: process(k); 25 } Nested Switch You can have a switch as a part of the statement sequence of an outer Even switch. if the case constants of the inner and the outer switch contain common values, no conflict arise. 26 switch(x) { case 1: switch(y) { case 0: printf(''Divide by zero error.\n"); break; case 1: process(x, y); break; } break; case 2: . 27 Iteration Iteration statements (also called loops) allow a set of instructions to be repeatedly executed until a certain condition is reached. This condition may be predetermined (as in the for and while loop) or open ended (as do-while loops). 28 for loop for (initialization;testing;increment) Loop Body; The initialization is an assignment statement that is used to set the loop control variable. The testing is a relational expression that determines when the loop exits. The increment defines how the loop control variable changes each time the loop is repeated. 29 Execution The for loop continues to execute as long as the condition is true. Once the condition becomes false, program execution resumes on the statement following the body of the for loop. 30 #include <stdio.h> int main(void) { int x; for(x=1; x <= 100; x++) printf("%d ", x); return 0; } for(x=100; x != 65; x -= 5) { z = x*x; printf(''The square of %d, %d", x, z); } 31 The Elements of the For-loop The initialization, testing and incrementation can be any valid C expression. for (x=0; Ajax>Manchester; Ajax=Q*7/i) Common use as a counting loop. for (count=0; count <n; count=count+1) 32 Pieces of the loop definition need not be there. for(x=0; x != 123; ) scanf("%d", &x); The incrementation of the loop control variable can occur outside the for statement. for( x=1 ; x < 10; ) { printf("%d", x); ++x; } 33 The Infinite Loop Since none of the three expressions that form the for loop are required, you can make an endless loop by leaving the conditional expression empty. for( ; ; ) Terminate the infinite loop printf("This loop will run forever.\n"); for( ; ; ) { ch = getchar(); /* get a character */ if(ch == 'A') break; /* exit the loop */ } 34 printf("you typed an A"); For Loops With No Bodies A loop body may be empty. This fact is used to simplify the coding of certain algorithms and to create time delay loops. Does what? for(t=0; t < SOME_VALUE; t++ ) ; 35 Declaring Variables within a For Loop A variable so declared has its scope limited to the block of code controlled by that statement. /* i is local to for loop; j is known outside loop.*/ int j; for( int i = 0; i<10; i++) j = i * i; i = 10; /*** Error ***-- i not known here! */ 36 While Loop General form: while(condition) statement; Execution: Check the test condition at the top of the loop. The loop iterates while the condition is true. When the condition becomes false, program control passes to the line of code immediately following the loop. 37 Example char wait_for_char(void) { char ch; ch = '\0'; /* initialize ch */ while(ch != 'A') ch = getchar(); return ch; } while((ch=getchar()) != 'A') ; 38 Example 2 void func1() {int process1(void); int process2(void); int process3(void); int working; working = 1; while (working) { working = process1(); if (working) working = process2(); if (working) working = process3(); } } 39 For loop Vs While Loop A-(Assignment), T-(testing), I-(Increment) for (A; T; I) { Body; } A; While (T) { Body; I; } 40 NESTED LOOPS Nested Loop Why?- 1 loop syntax coded inside another syntax. Single -Loop? Why? - Nested-Loops? Have a statement or statements that you want to repeat. A repetitive task that you must solve. You have a single repetitive task - THAT YOU MUST REPEAT i.e., a repetition of an already repetitive task.41 General Format: while (boolean expression){ while (boolean expression) { } } You may have any combination of the 3 loop syntax inside each other. The problem dictates what combination should be used. 42 /* Find triples of integers that add up to n. */ #include <stdio.h> #define N 7 main() { int cnt = 0, j , k , m; for(j = 0; j <= N; ++j) for( k = 0; k <= N; ++k) for( m = 0: m <= N; ++m) if ( j + k + m == N) { ++cnt; printf(%d%d%d, j , k , m); } printf(\n Count: %d\n, cnt); } 43 How many times will if be executed? 512 times j range 0 k range 0 m range 0 7 7 7 8 * 8 * 8 = 512 44 What will the values of j, k, and m be in sequence J 0 0 0 K 0 0 0 M 0 1 2 0 0 7 0 0 0 1 1 1 0 1 2 0 1 7 45 Cont... 0 0 2 2 0 1 0 2 7 . . . 46 do-while Loop General form: do { statement; } while(condition); Execution: Always executes at least once. Iterates until condition becomes false. do { scanf(''%d", &num); } while(num > 100); 47 The most common use of the do-while loop is in a menu selection function. void menu(void) { char ch; printf("1. Check Spelling\n"); printf("2. Correct Spelling Errors\n"); printf("3. Display Spelling Errors\n"); printf(" Enter your choice: "); 48 do { ch = getchar(); /* read the selection from the keyboard */ switch(ch) { case '1': check_spelling(); break; case '2': correct_errors(); break; case '3': display_errors(); break; } } while(ch=='1' || ch=='2' || ch=='3'); } 49 Jump break continue return (will be introduced in Ch. 4, Functions). 50 break Statement #include <stdio.h> Two uses: You can use it to terminate a case in the switch statement. int main (void) { int t; for(t=0; t < 100; t++) { printf(''%d ", t); if(t == 10) break; } You can also use it to force immediate termination of a return 0; loop, bypassing the normal } loop conditional test. 0 1 2 3 4 5 6 7 8 9 10 51 A break causes an exit from only the innermost loop. for(t=0; t < 100; ++t) { count = 1; for(;;) { printf(''%d ", count); count++; if(count == 10) break; } } 123456789123456789 100 times 52 Breaking out of loops Sometimes loops need to be cut short: You can break out of any loop with break ; statement. A break will cause the loop to be aborted immediately. The next statement executed is the statement following the loop. Compare this with return: A return will cause a function to be aborted immediately. Control returns to the calling function. 53 Continue Statement General form continue; break forces termination of the loop. continue forces the next iteration of the loop to take place, skipping any code in between. 54 continue can expedite the exit from a loop by forcing the conditional test to be performed sooner. For the for loop, continue causes the increment and then the conditional test portions of the loop to execute. For the while and do-while loops, program control passes to the conditional tests. 55 This function codes a void code(void) message by shifting all { characters you type char done, ch; one letter higher. For done = 0; example, an A while(!done) { becomes a B. The ch = getchar(); function will terminate if(ch == S') { when you type a S. done = 1; continue; } /* test the condition now */ putchar(ch+1); } 56
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Texas A&M - CSCE - 206
Functions and StructuredProgramming1Structured Programming Structured programming is a problem-solvingstrategy and a programming methodology. The construction of a program should embody topdown design of the overall problem into finitesubtasks. Ea
Texas A&M - CSCE - 206
INTRODUCTION TOCOMPUTER SCIENCECONCEPTS ANDPROGRAMMING1Outline Part I: An overview of Computer Science. Part II: Computer hardware and software. Part III: Computer languages.2Part I: An Overview ofComputer Science3What is Computer Science?Th
Texas A&M - CSCE - 206
OperatorsAndExpressions1Operators Arithmetic Operators Relational and Logical Operators Special Operators2Arithmetic OperatorsOperator+*/%-+ActionSubtraction, also unary minusAdditionMultiplicationDivisionModulusDecrementIncrement3
Texas A&M - CSCE - 206
Programming in CAn Overview1C-ProgrammingGeneral Purpose Language Developed by Dennis Ritchie of Bell Labs(1972).First used as The Systems Language for The UNIX operating system.Why C1. C is a SMALL Language.Small is beautiful in programming.Few
Texas A&M - CSCE - 206
Pointers1Why Pointers They provide the means by which functions canmodify arguments in the calling function. They support dynamic memory allocation. They provide support for dynamic datastructures, such as binary trees and linked lists.2What Are
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraCourse outlinePart I ( 3 weeks): Elementary linear algebra Systems of linear equations Gaussian elimination process, Gauss-Jordanreduction Matrix algebra Determinants and their propertiesPart II ( 4.5 weeks): Abst
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraMATH 304Linear AlgebraLecture 2:Gaussian elimination (continued).Row echelon form.Gauss-Jordan reduction.System of linear equations a11x1 + a12x2 + + a1n xn = b1a21x1 + a22x2 + + a2n xn = b2am1 x1 + am2 x2 + + a
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraMATH 304Linear AlgebraLecture 3:Some applications ofsystems of linear equations.Matrix algebra.Homework assignmentHomework assignment 1 (due Thursday, September8):Section 1.1: 1b, 1d, 3a, 3d, 6e, 6hSection 1.2:
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraHelp sessions:The Math 304/309/311/323 Help Session will beheld on MW from 7:30-10:00pm and on TR from6:30-9:00 p.m., BLOC 160Homework assignment #2(due Thursday, September 15)All problems are from Leons book (8th
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraHelp sessions:The Math 304/309/311/323 Help Session will beheld on MW from 7:30-10:00pm and on TR from6:30-9:00 p.m., BLOC 160Homework assignment #2(due Thursday, September 15)All problems are from Leons book (8th
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraHelp sessions:The Math 304/309/311/323 Help Session will beheld on MW from 7:30-10:00pm and on TR from6:30-9:00 p.m., BLOC 160Homework assignment #3(due Thursday, September 22)All problems are from Leons book (8th
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraHomework assignment #3(due Thursday, September 22)All problems are from Leons book (8th edition).Section 2.1: 3b, 3c, 3d, 3e, 3f, 3gSection 2.2: 3f, 4, 7c, 7dMATH 304Linear AlgebraLecture 7:Evaluation of determin
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraHomework assignment #4(due Thursday, September 29)All problems are from Leons book (8th edition).Section 3.1: 9a, 9b, 11Section 3.2: 1b, 1c, 11b, 11c, 13a, 13b, 20MATH 304Linear AlgebraPart II ( 4.5 weeks): Abstra
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraHomework assignment #4(due Thursday, September 29)All problems are from Leons book (8th edition).Section 3.1: 9a, 9b, 11Section 3.2: 1b, 1c, 11b, 11c, 13a, 13b, 20MATH 304Linear AlgebraPart II ( 4.5 weeks): Abstra
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraHomework assignment #5(due Thursday, October 6)All problems are from Leons book (8th edition).Section 3.3: 2b, 2c, 2e, 8c, 9d, 14Section 3.4: 8c, 10, 14c, 15aMATH 304Linear AlgebraLecture 10:Linear independence.
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraHomework assignment #5(due Thursday, October 5)All problems are from Leons book (8th edition).Section 3.3: 2b, 2c, 2e, 8c, 9d, 14Section 3.4: 8c, 10, 14c, 15aMATH 304Linear AlgebraLecture 11:Basis and dimension.
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraHomework assignment #6(due Thursday, October 20)All problems are from Leons book (8th edition).Section 3.5: 1b, 5a, 6a, 6bSection 3.6: 1a, 2a, 2b, 2c, 9, 16MATH 304Linear AlgebraLecture 12:Rank and nullity of a m
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraMATH 304Linear AlgebraLecture 13:Review for Test 1.Topics for Test 1Part I: Elementary linear algebra (Leon 1.11.5,2.12.2) Systems of linear equations: elementaryoperations, Gaussian elimination, back substitutio
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraHomework assignment #6(due Thursday, October 20)All problems are from Leons book (8th edition).Section 3.5: 1b, 5a, 6a, 6bSection 3.6: 1a, 2a, 2b, 2c, 9, 16MATH 304Linear AlgebraLecture 14:Basis and coordinates.
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraHomework assignment #7(due Thursday, October 27)All problems are from Leons book.Section 4.1: 4, 7c, 7d, 17c, 19aSection 4.2: 2c, 3c, 4a, 6, 15MATH 304Linear AlgebraLecture 15:Linear transformations (continued).
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraHomework assignment #7(due Thursday, October 27)All problems are from Leons book.Section 4.1: 4, 7c, 7d, 17c, 19aSection 4.2: 2c, 3c, 4a, 6, 15MATH 304Linear AlgebraLecture 16:Matrix transformations (continued).
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraHomework assignment #8(due Thursday, November 3)All problems are from Leons book.Section 4.3: 4, 11Section 5.1: 3c, 5, 7, 17Section 5.2: 1b, 2a, 4, 9MATH 304505Linear AlgebraPart III ( 3.5 weeks): Advanced linear
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraHomework assignment #8(due Thursday, November 3)All problems are from Leons book (8th edition).Section 4.3: 4, 11Section 5.1: 3c, 5, 7, 17Section 5.2: 1b, 2a, 4, 9MATH 304Linear AlgebraLecture 18:Orthogonal comp
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraHomework assignment #9(due Thursday, November 10)All problems are from Leons book (8th edition).Section 5.3: 1b, 1c, 3a, 5, 6Section 5.4: 3b, 7c, 8a, 15b, 30MATH 304Linear AlgebraLecture 19:Least squares problems
Texas A&M - MATH - 304
MATH 304, Fall 2011Linear AlgebraHomework assignment #9(due Thursday, November 10)All problems are from Leons book (8th edition).Section 5.3: 1b, 1c, 3a, 5, 6Section 5.4: 3b, 7c, 8a, 15b, 30MATH 304Linear AlgebraLecture 20:Inner product spaces.
Texas A&M - GEOG - 305
Notes 11-7Texas PopulationRapid Demographic Change in TexasPrimarily growthSecondarily diversity-Texas is considered one of the 5 most diverse statesCities of TexasCities &amp; ResearchCities are functional regions.-Continuation of Human Settlements
Texas A&M - ENGR - 111 A
Exam 1 Problem #24:1 point - Free point for starting atleast the FBD2 points - FBD - 3 forces and coordinate orientation; 1/2 point each3 points - Right equations for Sum of X, Y and Moment to calculate external forces3 points - FBD at 3 significant n
Texas A&M - ENGR - 111 A
Exam 1 Topic ListENGR 111 Track A1.2.3.4.5.Summing Forces: Procedure for using geometry to calculate force resultants and sumsFree Body diagram construction ProcedureCables (ropes), forces in cables.Reactions at Pin and Roller jointsMoment Calc
Texas A&M - ENGR - 111 A
Outline of Topics for Final Project Technical MemoDate:To:From:Subject:Objective of ProjectTechnical Approach1. Analysis2. Design3. Fabrication4. Testing of alternatives5. Final DesignSummary of Dry-Run ResultsSummary of Final-Run ResultsPic
Texas A&M - ENGR - 111 A
Individual Homework Submission Guidelines for Problem Solving AssignmentsHomework should be presented in a neat and professional manner. The following formatis required in this course. It is a means of organization and is not meant to punish you orforc
Texas A&M - ENGR - 111 A
Homework Solutions Chapter 55.1 A = 145.6 lbB = 109.4 lb5.3 A = 33.3 lbB = 53.3 lb5.4 A = -53.3 lbsB = 213.3 lb F = 120 lb5.5 Cx = -5.625 NCy = 16.5 ND = 9.375 N5.6 B = 42.86 NAx = 68.57 N5.8 d = 3.10 ftB = 462.5 lb5.10a. Dy = (F/3) + (2P/3
Texas A&M - ENGR - 111 A
Homework Solutions Chapter 66.1 TAB = -625 lbTAC = 375 lb TBC = 1000 lb TBD = -625 lb TCD = 375 lb6.2 TAB = -500 lbTAC = 0 lbTBC = 625 lb TBD = -375 lb TCD = 625 lb TCE = 0 lb TDE= -500 lb6.3 Safety Factor = 3.20 for 1000 lb load (weakest element i
MIT - AERO - 16.72
Urban OR 2000 Quiz #2 Solutions 12/12/00 Prepared by JTH1a) 0,0,0 20,1,2 20,2,2 20,3,211 2 2 221 1 21,1,2 1 2 2 21,2,11 21,2,21,0,11,1,111 2 112,1,2 212,0,12,1,113,0,1 1b)1 1 + 2 + 21,2,2X1 1 + 2 + 21,2,2 0,3,
MIT - AERO - 16.72
Urban Operations Research Fall 2001 Quiz 2 SolutionsCompiled by James S. Kang 12/5/2001Problem 1 (Larson, 2001) (a) One is tempted to say yes by setting = N=2 221 = 2 . But = 2 is not the rate at whichcustomers are accepted into the system b ecause
MIT - AERO - 16.851
Attitude Determination and Control Attitude (ADCS)16.684 Space Systems Product Development Spring 2001Olivier L. de Weck Department of Aeronautics and Astronautics Massachusetts Institute of TechnologyADCS Motivation ADCSMotivationIn order to point a
University of Texas - E E - 325
Example : Show that the average power flux per unit area for an EM planewave can be represented asExample: Show that in a lossy medium with the average power fluxcan be represented asExample: For Fresh Water, we have R=50, = 2 0 , = 5 2 0 .3 p/m,Exo
University of Texas - E E - 325
University of Texas - E E - 325
Homework #4, Chapters 5 and 61.Within the region 1 5 cm, 0 0.3 , 0 z 2 cm, current density isgiven as J = (200 cos )a/(+ 0.01)A/m2. What total current in the a directioncrosses the surface: (a) = 0, 1 5 cm, 0 z 2 cm? (b) = 0.3, 1 5cm, and 0z 2 cm? (c
University of Texas - E E - 325
Homework #5, Chapter 71.Find H at P(2,3,5) in cartesian coordinates if there is an infinitely long currentfilament passing through the origin and point C. The current of 50 A is di- rected fromthe origin to C, where the location of C is: (a) C(0,0,1);
University of Texas - M - 346
M346 Midterm Exam 1 SolutionsLet L : R2 R2 be dened by L(x) = (15x1 + 24x2 , 8x1 13x2 )T , where x = (x1 , x2 )T .Let E be the standard basis of R2 and B = cfw_(2, 1)T , (3, 2)T be an alternate basis.I.1. (10 points) Find the change-of-basis matrices
University of Texas - M - 346
M346 Midterm Exam 2 Solutiona( (10 points) Find) matrix with eigenvalues 2+3i and 23i, and corresponding eigenvectors)(iiand.11]][[i i 2 + 3i0Ans: Let P =and D =, we have110 2 3 i[][][] 1i i 2 + 3i0i i1A = PDP =110 2 3i1
University of Texas - M - 346
M346 First Midterm Exam, September 18, 2009 1 0 2 5 1) In R2 , let E = be the standard basis and let B = , 0 1 3 7 be an alternate basis. a) Find PEB and PBE . 4 , nd [v]B . b) If v = 1 c) Solve the system of equations: 2x1 + 5x2 = 4; 3x1 + 7x2 = 1. 2. In
University of Texas - M - 346
University of Texas - M - 346
University of Texas - M - 346
University of Texas - M - 346
University of Texas - M - 346
University of Texas - M - 346
University of Texas - M - 346
University of Texas - M - 346
University of Texas - M - 346
University of Texas - M - 346
University of Texas - M - 346
University of Texas - M - 346
University of Texas - M - 346
University of Texas - M - 346
University of Texas - M - 346
M341 Midterm Exam 156215February 17Name:UTEID:Score:IIIIIIIVVVIVIIYou can quote theorems, lemmas, or results in books and homework assignment without proving.1I.(15 points) Examples.1. Give an example of a 3 3 matrix A such that A is symme
University of Texas - E E - 339
Fabrication basics1Outline Semiconductor devices and interconnects: fabricationissues Doping depth profile controlduring epitaxial growthvia diffusionvia ion implantation Insulation/dielectrics/oxide layers Contacts and metallization Lithograph
University of Texas - E E - 339
P-N Junction: Equilibrium Conditions1Outline roles of p-n junctions; a reminder Abrupt junction approximation Contact potential and equilibrium band-bending Depletion approximation, and total and partialdepletion region widths One-sided junctions
University of Texas - E E - 339
P-N Junction: Steady-State Current flow1Outline Forward and Reverse bias Current flow: qualitative analysis Current flow: quantitative analysis Reverse breakdownZener breakdownAvalanche breakdown (Other) deviations from simple theory Short diode
University of Texas - E E - 339
P-N junctions: Capacitance and Switching1Outline CapacitanceDepletion capacitanceDiffusion capacitancecapacitance SwitchingDiffusion charge and storage delay timesDepletion layer charge and switching transients Summary21Capacitance of p-n jun