MATLAB C Math Library
  Go to function:
    Search    Help Desk 
mlfVarargout    Examples   See Also

Build a list of varargout output arguments from array variables.

Minimum number of input arguments: one, maximum: user-defined. Terminate the argument list with a NULL.

C Prototype

Arguments

mxArray **ppa
  A pointer to a pointer to an array.

Return

A cell array containing the output arguments.

Description

When the variable varargout appears as the last output argument in the definition of a MATLAB function, that function can return any number of outputs, starting at that position in the argument list.

In the MATLAB C Math Library, you use mlfVarargout() to construct the output argument list for varargout routines. The routine puts the arguments in a cell array. You must terminate the list with a NULL.

Example

This example uses the mlfDeal() routine to illustrate constructing a varargout list. The example creates a vector with the values [ 1 2 3 4 5 6 7 8 9 10 ] and copies this vector to each of the output arrays, A and B.

See Also

mlfIndexVarargout



[ Previous | Help Desk ]