Thanks for the feedback. As I said, I don't think the globals contribute much to the slow performance, as there is very little difference with or without them.
Thanks for the discussion. I am getting the same unexpected token error. My code (generated by another coworker) uses "varargin" and cell arrays.
Question: Does anyone know if there is a list of Matlab features that are not supported by Mathscript? Not "known issues" but limitations that Matlab programmers would have to know.
I called NI support