ES140CmpE_lecture4

ES140CmpE_lecture4 - ES 140 Module 2 Computer Engineering Lecture 4 Branching Statements and Loops Xenofon Koutsoukos Department of Electrical

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

View Full Document Right Arrow Icon
ES 140 Module 2 Computer Engineering Lecture 4: Branching Statements and Loops Xenofon Koutsoukos Department of Electrical Engineering and Computer Science Vanderbilt University Fall 2006
Background image of page 1

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

View Full DocumentRight Arrow Icon
Outline The logical data type Relational operators Logical operators Branches The “if” construct Loops The “for” loop
Background image of page 2
The Logical Data Type The  logical  data type is a special type of data that  can have only two possible values true false If a logical value is used when a numerical value is  expected True values are converted to 1 False values are converted to 0 These values are produced by two types of Matlab  operators Relational operators Logical operators These operators are very important for controlling the  part of a program to be executed
Background image of page 3

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

View Full DocumentRight Arrow Icon
Relational Operators Relational operators  are  operators with two  numerical or string  operands that yield a  logical result depending  on the relationship  between the two  operands a1 op a2 3 < 4  true (1)
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/30/2010 for the course ES 140 taught by Professor Varies during the Spring '07 term at Vanderbilt.

Page1 / 16

ES140CmpE_lecture4 - ES 140 Module 2 Computer Engineering Lecture 4 Branching Statements and Loops Xenofon Koutsoukos Department of Electrical

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

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