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

Build a list of output arguments, some of which are indexed expressions

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.

If you are indexing into any of the arrays that you pass as varargout output arguments, you must use mlfIndexVarargout() to form the varargout list. For indexed arguments, you specify the a pointer to the source array pointer, the index format string, and the index values, just as you would with the mlfIndexRef() routine. For nonindexed arguments, you specify the array argument paired with a NULL argument.

Example

In this example, output arguments z and n are indexed expressions. Note the similarity to mlfIndexRef() syntax. Because argument m is nonindexed, you follow it with a NULL argument to indicate that there is no associated indexing syntax with this argument.

See Also

mlfVarargout, mlfIndexRef, mlfIndexAssign



[ Previous | Help Desk | Next ]