Products & Services Solutions Academia Support User Community Company

Learn more about Parallel Computing Toolbox   

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

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS