ABSTRACT

This chapter covers the next building block in basic programming, one that exists in most programming languages and that is the Conditional Operators. It discusses the working with built-in functions with vector arguments, MATLAB's interp1 function and some scalar and vector operations, including element-by-element operations. The if-elseif-else ladder works from top down. If the top logical expression is true, the statements related to that logical expression are executed, and the program will leave the ladder. The chapter also covers the if-elseif-else ladder, and describes the Switch Group. MATLAB's menu function allows the user to select from several choices by the use of push buttons on a graphical display. Each item listed in the menu is given a number according to its position in the menu list. If a script involves a mathematical operation of two vector functions, then the operation will require an element-by-element operation.