lecture_7

lecture_7 - Lecture 7 Comp 116 Feb 2nd, 2009 So far...

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

View Full Document Right Arrow Icon
Click to edit Master subtitle style 10/6/09 Lecture 7 Comp 116 Feb 2nd, 2009
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/6/09 So far… Programs (m-files) Execute statements in order One path through code How do we Sometimes do one thing Sometimes do another
Background image of page 2
10/6/09 Logical expressions
Background image of page 3

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

View Full DocumentRight Arrow Icon
10/6/09 Conditional Execution Guess a number. ..
Background image of page 4
10/6/09 Logical Data Type Two values false or true 0 or 1 Conceptually: 1 bit MATLAB: logical, 1 byte
Background image of page 5

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

View Full DocumentRight Arrow Icon
10/6/09 Relational Operators Test relationships between values operands: any data type result: logical
Background image of page 6
10/6/09 Relational Operators Scalar – Scalar (1 x 1) <= (1 x 1) Array – Scalar (m x n) == (1 x 1) (1 x 1) ~= (m x n) Array – Array (matching sizes) (m x n) > (m x n)
Background image of page 7

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

View Full DocumentRight Arrow Icon
10/6/09 Examples x = [1 2; 3 4] y = [2, -2]
Background image of page 8
10/6/09 Precision Try this in MATLAB
Background image of page 9

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

View Full DocumentRight Arrow Icon
10/6/09 Logical Operators Work with logical data types operands: logical result: logical help relop
Background image of page 10
Logical Operators ~ is unary
Background image of page 11

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

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 27

lecture_7 - Lecture 7 Comp 116 Feb 2nd, 2009 So far...

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

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