ABSTRACT

This chapter provides an overview on how to specify a conditional statement to a computer using MATLAB. It begins with an explanation of MATLAB Boolean logic with examples, use of comparison operators, and comparison with vectors. We proceed to show readers how to use “ if-end-else”  as well as how to use loops to prescribe repetitive tasks.