| MATLAB® |
Use this list to find examples in the documentation.
Constructing a Simple Matrix
Creating a Magic Square Matrix
Creating a Random Matrix
Creating a Diagonal Matrix
Concatenating Matrices
Replicating a Matrix
Creating a Block Diagonal Matrix
Combining Single and Double Types
Combining Integer and Double Types
Combining Character and Double Types
Combining Logical and Double Types
Accessing Single Elements
Linear Indexing
Functions That Control Indexing Style
Accessing Multiple Elements
Nonconsecutive Elements
Specifying All Elements of a Row or Column
Example Using numel
Example Using ndims, numel, and size
Example Using isnumeric and isreal
Expanding the Size of a Matrix
Diminishing the Size of a Matrix
Reshaping a Matrix
Transposing a Matrix
Rotating a Matrix
Flipping a Matrix
Shifting the Location of Matrix Elements
Sorting the Data in Each Column
Sorting the Data in Each Row
Sorting Row Vectors
Constructing a Matrix from a Diagonal Vector
Returning a Triangular Portion of a Matrix
Generating Arrays Using Indexing
Generating Arrays Using MATLAB® Functions
Building Multidimensional Arrays with the cat Function
Operating on Planes and Matrices
Multidimensional Cell Arrays
Multidimensional Structure Arrays
Creating Integer Data
Warnings for Integer Classes
Creating Floating-Point Data
Accuracy of Floating-Point Data
Creating Complex Numbers
Display Format Examples
Setting Numeric Format in a Program
Functions that Return a Logical Result
Converting to a Cell Array of Strings
Sequential and Numbered Argument Specification
The Formatting Operator
Specifying Field Width and Precision Outside the format String
Using Identifiers In the Width and Precision Fields
Comparing Strings for Equality
Comparing for Equality Using Operators
Categorizing Characters Within a String
Searching and Replacing
Converting to a Character Equivalent
Converting to a String of Numbers
Converting from a Character Equivalent
Converting from a Numeric String
Date Strings
Conversions Between Date Formats
Date String Formats
Converting Output Format with datestr
Current Date and Time
Building Structure Arrays Using Assignment Statements
Accessing Data in Structure Arrays
Dynamic Field Names Example
Adding Fields to Structures
Deleting Fields from Structures
Applying Functions and Operators
Writing Functions to Operate on Structures
Organizing Data in Structure Arrays
Example — A Simple Database
Building Nested Structures with the struct Function
Building Cell Arrays with Concatenation
Preallocating Cell Arrays with the cell Function
Referencing Cells of a Cell Array
Displaying Parts of the Cell Array
Assigning Cells
Assigning Multiple Cells
Working With Structures Within Cells
Working With Cell Arrays Within Cells
Reshaping Cell Arrays
Replacing Lists of Variables with Cell Arrays
Applying Functions and Operators
Building Nested Arrays with Nested Curly Braces
Building Nested Arrays with the cell Function
Indexing Nested Cell Arrays
Converting Between Cell and Numeric Arrays
Cell Arrays of Structures
Arithmetic Operators and Arrays
Relational Operators and Arrays
Element-Wise Operators and Functions
Logical Expressions Using the find Function
Bit-Wise Functions
Overriding Default Precedence
Character Classes
Grouping Operators
Positional Operators
Lookaround Operators
Using Lookaround as a Logical Operator
Quantifiers
Using Tokens — Example 1
Using Tokens — Example 2
Named Capture
Labeling Your Output
Example of a Dynamic Expression
Dynamic Expressions that Modify the Match Expression —
(??expr)
Dynamic Commands that Modify the Match Expression —
(??@cmd)
Dynamic Commands that Serve a Functional Purpose — (?@cmd)
Dynamic Commands that Modify the Replacement Expression —
${cmd}
Finding a Single Pattern in Multiple Strings
Finding Multiple Patterns in Multiple Strings
Replacing Multiple Strings
Generating a List from a Cell Array
Generating a List from a Structure
Assigning Output from a Comma-Separated List
Assigning to a Comma-Separated List
Constructing Arrays
Displaying Arrays
Concatenation
Function Call Arguments
Function Return Values
Fast Fourier Transform Example
Basic Parts of an M-File
Creating a Simple M-File
Simple Script Example
Simple Function Example
Detailed Display of M-File Dependencies
MATLAB® Command Syntax
MATLAB® Function Syntax
Example 1 — Simple Variable Comparison
Querying Which Function Gets Called
Passing Strings
Passing Filenames
Passing Function Handles
Passing Arguments in a Structure
Passing Arguments in a Cell Array
Checking the Number of Input Arguments
Passing Variable Numbers of Arguments
Unpacking varargin Contents
Packing varargout Contents
varargin and varargout in Argument Lists
Subfunctions
Vectorizing Loops
Constructing an Anonymous Function
A Two-Input Example
Evaluating With No Input Arguments
Changing Variables Used in an Anonymous Function
Example 1 — Passing a Function to quad
Example 2 — Multiple Anonymous Functions
Writing Nested Functions
Example — More Than One Nested Function
Example — Multiply Nested Functions
Calling Nested Functions
Variable Scope in Nested Functions
The Scope of Output Variables
Using Function Handles with Nested Functions
Defining Variables When Calling Via Function Handle
Example Using Externally Scoped Variables
Separate Instances of Externally Scoped Variables
Example 1 — Creating a Function Handle for a Nested
Function
Example 2 — Function-Generating Functions
Example of Selecting Variables to Load
Example of M-Code Generation
Example 1—Text Data
Example 2— Partial Text File with Row Vectors
Example 3 — Binary Data Assigned to a Structure
Constructing a memmapfile Object
Changing Property Values
Mapping Multiple Data Types and Arrays
Repeating a Format Scheme
Example 1 — Reading a Single Data Type
Example 2 — Formatting File Data as a Matrix
Example 3 — Reading Multiple Data Types
Example 4 — Modifying Map Parameters
Writing to a Mapped File
When Memory Is Mapped in Nonstructure Format
When Memory Is Mapped in Scalar Structure Format
When Memory Is Mapped in Nonscalar Structure Format
Working with Copies of the Mapped Data
Using the disp Method
Using the get Method
Memory-Mapping Demo
Constructing the Object with Default Property Values
Mapping a Single Data Type
Formatting the Mapped Data to an Array
Using Import Functions with Text Data
Importing Numeric Text Data
Importing Delimited ASCII Data Files
Importing Numeric Data with Text Headers
Importing Mixed Alphabetic and Numeric Data
Using the save Function
Using the dlmwrite Function
Using the diary Function to Export Data
Example — Querying an XLS File
Example — Writing To an XLS File
Example — Reading from an XLS File
Example — Querying a WK1 File
Example — Writing to a WK1 File
Example — Reading from a WK1 File
Formatted Message Strings
Message Identifiers
Example 1 — Enabling a Selected Warning
Example 2 — Disabling the Most Recent Warning
Output from Control Statements
Output Structure Array
Example 1 — Performing an Explicit Query
Example 2 — Performing an Implicit Query
Example 1 — Displaying a Stack Trace on a Specific Warning
Example 2 — Enabling Verbose Warnings
Stopwatch Timer Functions
Simple Example of Vectorizing
Advanced Example of Vectorizing
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |