MATLAB Examples

Copyright 2016 The MathWorks, Inc.

These are the files used in the webinar on Feb. 23, 2011. This file provides a brief description of the contents of the demo files and the steps needed to download the public data sources for use

Is derived from Gerard Schuster's MATLAB example and book Seismic Interferometry

In this example we see how to use callback functions in the Parallel Computing Toolbox™ to notify us when a task has completed and to update graphics when task results are available. We also see

The Parallel Computing Toolbox™ enables us to execute our MATLAB® programs on a cluster of computers. In this example, we look at how to divide a large collection of MATLAB operations into

In this example, we look at two common cases when we might want to write a wrapper function for the Parallel Computing Toolbox™. Those wrapper functions will be our task functions and will

In this example, we look at how we can reduce the run time of our jobs in the Parallel Computing Toolbox™ by minimizing the network traffic. It is likely that the network bandwidth is severely

Change the behavior of the examples in the Parallel Computing Toolbox™. There are at least two versions of each example in the Parallel Computing Toolbox: a sequential version and a

Plays the card game of blackjack, also known as 21. We simulate a number of players that are independently playing thousands of hands at a time, and display payoff statistics. Simulating the

Use the parallel profiler. It is intended to be a quick-start guide to using the parallel profiler graphical user interface (GUI) and its basic commands. Links are provided to the other

Profile the implicit communication that occurs when using an unevenly distributed array.

Benchmark solving a linear system on a cluster. The MATLAB® code to solve for x in A*x = b is very simple. Most frequently, one uses matrix left division, also known as mldivide or the backslash

Profile explicit communication to the nearest neighbor lab. It illustrates the use of labSend, labReceive, and labSendReceive, showing both the slow (incorrect) and the fast (optimal)

In this example, we show how to benchmark an application using independent jobs on the cluster, and we analyze the results in some detail. In particular, we:

Looks at why it is so hard to give a concrete answer to the question "How will my (parallel) application perform on my multi-core machine or on my cluster?" The answer most commonly given is "It

Uses the Parallel Computing Toolbox™ to play the card game of blackjack, also known as 21. We simulate a number of players that are independently playing thousands of hands at a time, and

Solve an embarrassingly parallel problem with uneven work distribution using for drange. The for drange splits iterations equally. As a result it can do suboptimal load balancing, which is

Benchmarks the parfor construct by repeatedly playing the card game of blackjack, also known as 21. We use parfor to play the card game multiple times in parallel, varying the number of

How a simple, well-known mathematical problem, the Mandelbrot Set, can be expressed in MATLAB® code. Using Parallel Computing Toolbox™ this code is then adapted to make use of GPU hardware

Uses Parallel Computing Toolbox™ to play the card game of blackjack, also known as 21. We simulate a number of players that are independently playing thousands of hands at a time, and display

Perform a parameter sweep in parallel and plot progress during parallel computations. You can use a DataQueue to monitor results during computations on a parallel pool. You can also use a

Access a large dataset in the cloud and process it in a cloud cluster using MATLAB capabilities for big data.

Develop your parallel MATLAB® code on your local machine and scale up to a cluster. Clusters provide more computational resources to speed up and distribute your computations. You can run

Sharpen an image using gpuArrays and GPU-enabled functions.

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Contact your local office