In C++, you can easily get a function pointer to the method of a class:
doIt = &MyClass::DoIt; // get a function pointer on method DoIt in class MyClass
...
(*this.*doIt)(x, y, z); // Call the function on an instance on MyClass (this for example)
...
But how can I do this in Matlab? I tried something with doIt = MyClass.DoIt
, but that does not work.
(I will need this for a message passing scheme: The function pointer will be handed to various instances of the class in a message in order to call the respective function on the respective instance.)