Code Trace for MATLAB
Updated 26 Oct 2022
Code Trace for MATLAB®
Code Trace for MATLAB is a collection of functions for creating and manipulating code traces, which can be used to help understand what is happening in code as it executes. A code trace prints a brief note to the MATLAB Command Window whenever a specific line of code is executed. A code trace might just print the function name and line number, or it might also print a label and the value of variable or expression.
addCodeTrace with the name of a MATLAB function or script file and the line number that you want to trace:
Then, call your function as your normally would:
out = myfunc(input1,input2);
See the script GettingStarted.mlx, in the doc folder, for examples.
Code Trace for MATLAB requires MATLAB release R2019b or newer.
Download the files to a folder on your computer, and place that folder on the MATLAB Search Path.
The license is available in the License file within this repository.
Copyright 2022 The MathWorks, Inc.
Steve Eddins (2023). Code Trace for MATLAB (https://github.com/mathworks/MATLAB-code-trace/releases/tag/v2.0.0), GitHub. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
See release notes for this release on GitHub: https://github.com/mathworks/MATLAB-code-trace/releases/tag/v2.0.0