| MATLAB C Math Library | Search  Help Desk |
| mlfVarargout | Examples See Also |
Build a list of varargout output arguments from array variables.
NULL.
C Prototype
mlfVarargoutList *mlfVarargout(mxArray **ppa, ...);
Arguments
mxArray **ppaReturn
A cell array containing the output arguments.Description
When the variablevarargout 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 themlfDeal() 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.
mxArray *A = NULL; mxArray *B = NULL; mlfDeal(mlfVarargout(&A,&B,NULL),mlfColon(mlfScalar(1), mlfScalar(10),NULL));
See Also
mlfIndexVarargout