| 3219 | } |
| 3220 | |
| 3221 | void call_matlab_for_real ( |
| 3222 | int nlhs, |
| 3223 | mxArray* plhs[], |
| 3224 | int nrhs, |
| 3225 | mxArray* prhs[], |
| 3226 | const std::string& function_name |
| 3227 | ) |
| 3228 | { |
| 3229 | int status = mexCallMATLAB(nlhs, plhs, nrhs, prhs, function_name.c_str()); |
| 3230 | if (status) |
| 3231 | { |
| 3232 | throw dlib::error("Error, an exception was thrown when we tried to call the MATLAB function '" + function_name + "'."); |
| 3233 | } |
| 3234 | } |
| 3235 | |
| 3236 | // ---------------------------------------------------------------------------------------- |
| 3237 | // ---------------------------------------------------------------------------------------- |