Main Content

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

|