User:Eml4500.f08.gator.mueller/Matlabtutorial

Relations

Many of the relational operators used in MATLAB are used very similar to the operators used in C++ to compare variables. The advantage to using MATLAB for relational operators is when matrices are being used. In a programming language you would need to write a for loop when comparing matrices instead of just a single line of code.

The relational operators are:
 * < (less than)
 * > (greater than)
 * <= (equal or less than)
 * >= (equal or greater than)
 * == (equal to)
 * ~= (not equal to)
 * & (and)
 * | (or)
 * ~ (not)

When using these statements, the line of code will return a 0 or 1 representing false and true respectively.