Table 3-1 in MATLAB for Dummies

A reader wrote a short while ago about a potential error in Table 3-1 on page 51 of MATLAB for Dummies. Errors do creep into books during the writing process and, despite my best efforts, no one spots them until after the book appears in print. In fact, I cover this very issue in Errors in Writing. If you ever find an error in your copy of a book, I’ll do my best to verify it and then post my findings there. The updated Table 3-1 should look like this:

Table 3-1: Relational Operators

Meaning Operator Example
Less than A < B A=2;
B=3;
A<B
ans = 1
Less than or equal to A <= B A=2;
B=3;
A<=B
ans = 1
Equal A == B A=2;
B=3;
A==B
ans = 0
Greater than or equal to A >= B A=2;
B=3;
A>=B
ans = 0
Greater than A > B A=2;
B=3;
A>B
ans = 0
Not equal A ~= B A=2;
B=3;
A~=B
ans = 1

 

The area of interest is the Example column. The updated information will demonstrate the use of MATLAB in figuring out the relationships between expressions. Please let me know if you find any other errors in this book by contacting me at John@JohnMuellerBooks.com.