Skip to Main Content Skip to Search
Product Documentation

NumberOfOutputArguments - Number of arguments returned by task function

Description

When you create a task with the createTask function, you define how many output arguments are expected from the task function.

Characteristics

Usage

Task object

Read-only

While task is running or finished

Data type

Double

Values

A matrix is considered one argument.

Examples

Create a task and examine its NumberOfOutputArguments property.

jm = findResource('scheduler','type','jobmanager', ...
          'name','MyJobManager','LookupURL','JobMgrHost');
j = createJob(jm);
t = createTask(j, @rand, 1, {2, 4});
get(t,'NumberOfOutputArguments')
ans =
    1

This example returns a 2-by-4 matrix, which is a single argument. The NumberOfOutputArguments value is set by the createTask function, as the argument immediately after the task function definition; in this case, the 1 following the @rand argument.

See Also

Functions

createTask

Properties

OutputArguments

  


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