MATLAB parfor and C++ class mex wrappers (copy constructor required?)
问题 I'm trying to wrap a C++ class in a matlab mex wrapper using the approach outlined here. Basically, I have an initialization mex file which returns a C++ object handle: handle = myclass_init() I can then pass this to another mex file (e.g. myclass_amethod ) which use the handle to call class methods, then ultimately to myclass_delete to free the C++ object: retval = myclass_amethod(handle, parameter) myclass_delete(handle) I've wrapped this up in a MATLAB class for ease of use: classdef