Skip to Main Content Skip to Search
Product Documentation

OutputArguments - Data returned from execution of task

Description

OutputArguments is a 1-by-N cell array in which each element corresponds to each output argument requested from task evaluation. If the task's NumberOfOutputArguments property value is 0, or if the evaluation of the task produced an error, the cell array is empty.

Characteristics

Usage

Task object

Read-only

Always

Data type

Cell array

Values

The forms and values of the output arguments are totally dependent on the task function.

Examples

Create a job with a task and examine its result after running the job.

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

When the job is finished, retrieve the results as a cell array.

result = get(t, 'OutputArguments')

Retrieve the results from all the tasks of a job.

alltasks = get(j, 'Tasks')
allresults = get(alltasks, 'OutputArguments')

Because each task returns a cell array, allresults is a cell array of cell arrays.

See Also

Functions

createTask, getAllOutputArguments

Properties

Function, InputArguments, NumberOfOutputArguments

  


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