Programming |

MATLAB

Data Structures |
Introduces the basic data structures used in MATLAB: the two-dimensional matrix and multidimensional array (plus scalar, vector, and empty matrices), and describes how to construct and work with these data types. |

Data Types |
Presents the types of data used in MATLAB: numeric, logicals, characters, dates, structures, cell arrays, function handles, and object-oriented classes. |

Basic Program Components |
Presents the principal building blocks used in MATLAB programming: variables, keywords, special values, operators, expressions, regular expressions, comma-separated lists, control statements, symbols, and the extensive set of functions provided with MATLAB. |

M-File Programming |
Describes the overall process of developing programs in MATLAB. This chapter shows you how to work with M-files to create scripts and functions. It describes the various types of functions you can create, how to make calls to functions, handle argument data, and use function handles. |

Types of Functions |
Describes the various types of functions you can work with in MATLAB. These include the primary function, subfunctions, nested functions, anonymous functions, overloaded functions, and private functions. |

Data Import and Export |
Explains how to import and export data between MATLAB and the many different types of data files supported by MATLAB (including text, spreadsheet, graphics, and audio/video files, files formatted for scientific data, and files you might want to exchange over the Internet. |

Error Handling |
Describes how to put error checking into your programs, and how to identify, handle, and possibly recover from errors that occur. It also explains how to use message identifiers to better identify the source of an error, and how to selectively display or ignore warning messages. |

Classes and Objects |
Presents the MATLAB object-oriented programming capabilities. Classes and objects enable you to add new data types and new operations to MATLAB. This section also includes examples of how to implement well-behaved classes in MATLAB. |

Scheduling Program Execution with Timers |
Describes how to use the MATLAB Timer object to schedule program execution. |

Improving Performance and Memory Usage |
Explains techniques you can use to get the best performance and most efficient memory usage from your M-file programs. This includes information on MATLAB tools that measure the performance of your programs and identify where the bottlenecks are, and also advises what to do if you get an "Out of Memory" error. |

Programming Tips |
Provides a resource for the MATLAB programmer to pick up hints on helpful and time-saving practices. This section covers a wide range of topics, and attempts to address questions often raised by intermediate to experienced MATLAB users. |

**Related Information**

The following sections provide additional information on programming with MATLAB:

- Graphics -- describes how to plot vector and matrix data in 2-D and 3-D representations, how to annotate, print, and export plots, and how to use graphics objects and their figure and axes properties.
- Importing and Exporting Data -- describes techniques for importing data to and exporting data from the MATLAB environment.
- Interface to Generic DLL Files -- describes how to interact with functions in dynamic link libraries directly from MATLAB.
- Calling C and Fortran Programs from MATLAB -- describes how to build C and Fortran subroutines into MEX-files that you can call from MATLAB.
- Calling MATLAB from C and Fortran Programs -- discusses how to use the MATLAB engine library to call MATLAB from C and Fortran programs.
- Calling Java from MATLAB -- describes how to use the MATLAB interface to Java classes and objects.
- COM and DDE Support -- describes how to use Component Object Model (COM) and Dynamic Data Exchange (DDE) with MATLAB.
- Serial Port I/O -- describes how to communicate with peripheral devices such as modems, printers, and scientific instruments that you connect to your computer's serial port.

Data Structures |

© 1994-2005 The MathWorks, Inc.