MATLAB: Tracking the value of a variable in Debug Mode

debug

I have several variables that I want to track the values of throughout my function. I only seem to be able to track the value when I place a break-point at a point of interest. Is there some sort of "tag" function in which I can tell Matlab to continually track the value of a variable?

Best Answer

You can list the variable's name by itself on it's own line in your source code, with no semicolon after it. When execution hits that line of code, it will spew the value of the variable out to the command window. No breakpoint needed.