This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Examine or set default cluster profile


p = parallel.defaultClusterProfile
oldprofile = parallel.defaultClusterProfile(newprofile)


p = parallel.defaultClusterProfile returns the name of the default cluster profile.

oldprofile = parallel.defaultClusterProfile(newprofile) sets the default profile to be newprofile and returns the previous default profile. It might be useful to keep the old profile so that you can reset the default later.

If the default profile has been deleted, or if it has never been set, parallel.defaultClusterProfile returns 'local' as the default profile.

You can save modified profiles with the saveProfile or saveAsProfile method on a cluster object. You can create, delete, import, and modify profiles with the Cluster Profile Manager, accessible from the MATLAB desktop Home tab Environment area by selecting Parallel > Create and Manage Clusters.


Display the names of all available profiles and set the first in the list to be the default.

allProfiles = parallel.clusterProfiles

First set the profile named 'MyProfile' to be the default, and then set the profile named 'Profile2' to be the default.

oldDefault = parallel.defaultClusterProfile('Profile2');
strcmp(oldDefault,'MyProfile') % returns true

Introduced in R2012a