This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Callbacks in Applications

If you have a user interface that executes many callbacks through the MATLAB® engine, force these callbacks to be evaluated in the context of the base workspace. Use evalin to specify the base workspace for evaluating the callback expression. For example:

engEvalString(ep,"evalin('base', expression)")

Specifying the base workspace ensures MATLAB processes the callback correctly and returns results for that call.

This advice does not apply to computational applications that do not execute callbacks.

See Also