Main Content

methods

List functions of object class

    Description

    example

    methods(obj) displays the names of all methods for the class of which obj is an instance.

    example

    out = methods(obj) returns the method names in a cell array of vectors.

    Examples

    collapse all

    Create cluster, job, and task objects, and display the names of the public methods of these objects.

    c = parcluster("Processes");
    methods(c)
    
    j = createJob(c);
    methods(j)
    
    t = createTask(j,@rand,1,{3});
    methods(t)

    Create a distributed object and store the list of public methods of the distributed object in a cell array.

    d = rand(1000,'distributed');
    m = methods(d);

    Input Arguments

    collapse all

    Input specified as object or array of objects.

    Example: Task Objects

    Output Arguments

    collapse all

    List of methods, returned as a cell array of character vectors.

    Version History

    Introduced before R2006a