Skip to Main Content Skip to Search
Product Documentation

Examples


Use this list to find examples in the documentation.

Introduction Examples

Interactively Run a Loop in Parallel
Run a Batch Job
Run a Batch Parallel Loop
Program a Basic Job with a Local Cluster

Parallel for-Loops (parfor)

Creating a parfor-Loop
Differences Between for-Loops and parfor-Loops
Reduction Assignments: Values Updated by Each Iteration
Using a Custom Reduction Function

Single Program Multiple Data (spmd)

Defining an spmd Statement
Creating Composites in spmd Statements
Creating Distributed Arrays
Creating Codistributed Arrays

Interactive Parallel Mode (pmode)

Run Parallel Jobs Interactively Using pmode
Plotting Distributed Data Using pmode

Parallel Math

Creating a Codistributed Array
2-Dimensional Distribution
Using a for-Loop Over a Distributed Range (for-drange)

User Configurations

Create and Modify Cluster Profiles
Apply Cluster Profiles in Client Code

Parallel Profiler

Viewing Parallel Profile Data

Evaluating a Function on a Cluster

Example — Use dfeval

Programming Distributed Jobs

Create and Run Jobs with a Local Cluster
Create and Run Jobs

Generic Scheduler Interface

Example — Write the Submit Function
Example — Write the Decode Function
Example — Program and Run a Job in the Client

Programming Parallel Jobs

Use a Cluster with a Supported Scheduler

Graphics Processing Unit (GPU)

Construct an Identity Matrix on the GPU
Construct a Multidimensional Array on the GPU
Construct a Vector on the GPU
Calling Functions on GPUArray Objects
Running Your MATLAB Code
Selecting a GPU
Complete Kernel Workflow

  


Free Parallel Computing Interactive Kit

See how to solve large problems with minimal effort and reduce simulation time.

Get free kit

Trials Available

Try the latest versions of parallel computing products.

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