User`s guide

Internal Interface Functions
5-19
// version still returns an output (which, in MATLAB, would
// be assigned to the "ans" variable), it deallocates the
// output. This function processes any input arguments and
// passes them to the implementation version of the
// function, appearing above.
//
void Vfoo(mwArray x, mwArray y) {
mwArray a(mwArray::UNDEFINED);
mwArray b(mwArray::UNDEFINED);
a = Mfoo(&b, 0, x, y);
}
Input argument
processing
Call M-function