Skip to content
Snippets Groups Projects
Verified Commit 218bb1a1 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

k_order_welfare MEX: check number of arguments

parent 0a9dc013
No related branches found
No related tags found
No related merge requests found
...@@ -87,6 +87,8 @@ extern "C" { ...@@ -87,6 +87,8 @@ extern "C" {
void mexFunction(int nlhs, mxArray *plhs[], void mexFunction(int nlhs, mxArray *plhs[],
int nrhs, const mxArray *prhs[]) int nrhs, const mxArray *prhs[])
{ {
if (nlhs != 1 || nrhs != 3)
mexErrMsgTxt("Must have exactly 3 input arguments and 1 output argument");
const mxArray *dr_mx = prhs[0]; const mxArray *dr_mx = prhs[0];
const mxArray *M_mx = prhs[1]; const mxArray *M_mx = prhs[1];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment