Octave & FreeMat Tutorial -- 05 -- If-Then Statements and Loops
Channel: Andrew Norman
Date: 08/05/2013

Introducing if-then statements and "for" loops and "while" loops.


Playlist:
http://www.youtube.com/playlist?list=PL04PA2q0LfJI4kLcW0EKQcetWZd4q5bBP

Test relations you'll need to know for FreeMat and Octave:

If the statement is true, then will return 1.  If it is false, it will return 0.

Note:  There is more than one way to do a lot of these!
Check the "Operators" page on Mathworks' MATLAB page.

x==y means "x is equal to y"  (Note that there are TWO equals signs there.)

x~=y means "x is not equal to y"  (Note that's a tilde before the equals sign)

YouTube won't let me put the "greater than" sign in the video description, so you'll have to look at the video.  Sorry about that.  It's at 2:15.

Note that the following does not work in FreeMat 4.0:

or(A,B) means "A or B or both are true."

xor(A,B) means "A or B is true, but not both."

and(A,B) means "A and B are both true."