MATLAB: How to inspect local variables of a function

variables

I'd like to be able to view the local variables generated during the run of a function. One way is to load them to my workspace by saving them to a file, but that could become cumbersome as the number of temporary files proliferate as I experiment with running the function with different parameters. Is there another way?

Best Answer

Use breakpoints either in your script and/or in your function.