ENGR 101 Lecture Notes - Lecture 3: Logical Connective, Exclusive Or, Logical Matrix

52 views3 pages
7 Aug 2018
School
Department
Course

Document Summary

It checks the current value of x and sees if it less than 5. The result is called a truth value, it is either false (0) or true (1) Logical operator can combine two truth values according to the rules of formal logic o. If both are true, the whole is true. Don"t write 1 < x < 5 o o. Write 1 < x & x < 5. The result of a relational or logical operator is a logical array o o. 1s and 0s in a logical array are completely different type of data than regular numbers. When we put a [regular array] between the () in an indexing expression, we select those indices. == are for logical operators, while = aren"t. If you want to hardcore a logical matrix, you need to wrap it up in the logical function o. Any = any nonzero number in a matrix, vector, scalar .

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents