MATLAB: How to delete a workspace variable from s function

mexputvariablesimulink

Hello all
I am adding a variable using mexPutVariable function and reading the variable rom mexGetVariable function in s function (level 2 c). Question is how to delete the variable i created using mexPutVariable in workspace at the end? (Terminate function).
Thanks, Anand

Best Answer

Found the answer
mexEvalString("clear('global','MyTable_Map')");