Appendix C Introduction to MATLAB®

MATLAB, derived from MATrix LABoratory, is a software package that was originally developed in the late 1970s for the solution of scientific and engineering problems. The software can be used to execute a single statement or a list of statements, called a script or m‐file. MATLAB family includes the Optimization Toolbox, which is a library of programs or m‐files to solve different types of optimization problems. Some basic features of MATLAB are summarized in this appendix.

C.1 Features and Special Characters

Some of the important features and special characters used in MATLAB are indicated below:

  1. Symbol >:    This is the default prompt symbol in MATLAB
  2. Symbol ;:    A semicolon at the end of a line avoids the echoing the information entered before the semicolon
  3. Symbol …: Three periods at the end of a line indicates the continuation of the code in the next line
  4. help command_name: This displays information on different ways the command can be used
  5. Symbol %: Any text after this symbol is considered a comment and will not be operational
  6. MATLAB is case sensitive. Uppercase and lowercase letters are treated separately.
  7. MATLAB assumes all variables to be arrays. As such, separate dimension statements are not needed. Scalar quantities need not be given as arrays.
  8. Names of variables: variable names should start with a letter and can have a length of up to 31 characters in any combination of letters, digits, and underscores.
  9. The symbols for ...

Get Engineering Optimization, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.