ENGRMAE 10 Lecture Notes - Lecture 5: Hayes Command Set, Taco Bell
Document Summary
And or not greater than less than greater than or equal to less than or equal to not equal to. Often we want to compare values of different variables in order to determine what to do next. There are many relational operators that help us compare values. == equal to (notice the double equal sign. The relational operators above allow us to compare alphanumeric data. However, it we want to compare logical data, we need to use logical operators. Let"s go through some examples of using relational operators. When we compare two pieces of alphanumeric data matlab/octave returns 0 (false) or 1 (true). Often we want to do some action if two or more conditions are met. For example, if you have done your homework and it is earlier than midnight, you will go to taco bell for a snack. This will require the use of logical operators.