Hi all,
Relatively new MATLAB user and I've written a couple of functions and have started debugging those functions. I'm a bit confused though by the behavior in debug mode compared to what I'm used to when debugging script files.
For example, when running my function code up to a breakpoint, MATLAB clears the workspace (or more accurately it looks like MATLAB changes the workspace from the general workspace to the function's workspace). If I need some of the variables from my general workspace as input arguments to the function, MATLAB won't let me copy those variables over to the function workspace after function debugging has started.
How do folks work around these issues (or am I doing something wrong here)?
Thanks,
JK
Best Answer