MATLAB Programming: A Quick Start

Creating MATLAB programs with Mfiles

Scripts

Simple Mfile programs with no input or output arguments

Functions

Mfiles programs that accept input and return output

Subfunctions

Multiple functions within one Mfile

Private Functions

Functions with limited visibility

Variables

Guidelines for creating variables; global and persistent variables; special values

Data Types

Description of all MATLAB data types

Operators

Arithmetic, relational, and logical operators

Keywords

Reserved keywords that you should avoid using

Flow Control

Statements that affect the flow of your code

String Evaluation

Executing usersupplied strings and constructing executable strings

Dates and Times

Date formats and functions that handle dates and times

Calling Functions

Making function calls with function or command syntax

Obtaining User Input

Obtaining input from a user during Mfile execution

Subscripting and Indexing

Accessing and assigning to elements of a matrix

Empty Matrices

Matrices with at least one dimension equal to zero

Errors and Warnings

Reporting and recovering from errors that occur in your programs

Shell Escape Functions

Accessing your own C or Fortran programs using shell escape functions

Using MATLAB Timers

Scheduling the execution of MATLAB commands
