Skip to main content

Introduction

Figure 12.0.1. โ€œGive me a lever long enough and a fulcrum on which to place it, and I shall move the world.โ€ - Archimedes " - Sam Bechara
This chapter is a little weird. We are going to learn about relational and logical operators but it will seem out of place because we will not learn how to apply them until the next chapter. Eventually, we will use what we learn in this chapter to give our programs the ability to flow and make decisions. Until then, concentrate on learning how these operators work with my promise that it will make more sense why they are important in the coming chapters.
Before we jump in, a quick warning on this chapter. It is really easy to skip your brain workouts for this chapter. It is so tempting to type everything into MATLAB to get the answers without thinking. I urge you not to do this! When evaluating relational and logical expressions it is important to understand how they work in order to use them correctly. Be honest, follow along with this text, and be sure to not skip your brain workouts! Without further adoโ€ฆ
In this chapter, we will learn what the relational and logical operators are and how they work. We will save for why we need them until the next chapter. For now, we will learn: