MCPcopy Create free account
hub / github.com/davisking/dlib / mex_function

Function mex_function

dlib/matlab/example_mex_function.cpp:65–78  ·  view source on GitHub ↗

Make a function named mex_function() and put your code inside it. Note that the return type should be void. Use non-const reference arguments to return outputs. Finally, mex_function() must have no more than 20 arguments.

Source from the content-addressed store, hash-verified

63// arguments to return outputs. Finally, mex_function() must have no
64// more than 20 arguments.
65void mex_function (
66 const matrix_colmajor& x,
67 const matrix_colmajor& y,
68 matrix_colmajor& out1,
69 double& out2,
70 double some_number
71)
72{
73 out1 = x + y;
74 out2 = sum(x+y);
75
76 // we can also use cout to print things as usual:
77 cout << "some_number: "<< some_number << endl;
78}
79
80
81

Callers

nothing calls this directly

Calls 1

sumFunction · 0.50

Tested by

no test coverage detected