Skip to Main Content Skip to Search
Product Documentation

Examples


Use this list to find examples in the documentation.

Data Management

Defining a Variable for Multiple Execution Paths
Defining All Fields in a Structure
Defining Uninitialized Variables
Variable Reuse in an if Statement

Code Generation for Structures

Adding Fields in Consistent Order on Each Control Flow Path
Using repmat to Define an Array of Structures with Consistent Field Properties
Defining an Array of Structures Using Concatenation
Making Structures Persistent

Code Generation for Enumerated Data

Defining and Using Enumerated Types for Code Generation
Using the if Statement on Enumerated Data Types
Using the switch Statement on Enumerated Data Types
Using the while Statement on Enumerated Data Types

Generating Code for Variable-Size Data

Generating Code for a MATLAB Function That Expands a Vector in a Loop

Code Generation for Variable-Size Data

Constraining the Value of a Variable That Specifies Dimensions of Variable-Size Data
Specifying the Upper Bounds for All Instances of a Local Variable
Inferring Upper Bounds from Multiple Definitions with Different Shapes

Code Generation for Function Handles

Defining and Passing Function Handles for Code Generation

Using Variable-Length Argument Lists

Using Variable Numbers of Arguments in a for-Loop
Passing Variable Numbers of Arguments from One Function to Another

Optimizing Generated Code

Eliminating Redundant Copies of Function Inputs

Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS