When you run the Profiler on a file, some code might not run, such as a block containing an if statement.
To determine how much of a file ran when you profiled it, run the Coverage Report:
Profile a MATLAB® code file in the Profiler.
For detailed instructions, see Profiling for Improving Performance.
Ensure the Profiler is not currently profiling.
The Profiler displays a Start Profiling button when the Profiler is not running. If the Profiler is running, then do one of the following:
Wait for it to stop profiling before proceeding to step 4.
Click Stop Profiling.
The Stop Profiling button is available only when the Profiler is running.
Use the Current Folder browser to navigate to the folder containing the file for which you ran the Profiler.
On the Current Folder browser, click , and then select Reports > Coverage Report.
The Profiler Coverage Report appears, providing a summary of coverage for the file you profiled. In the image that follows, the profiled file is lengthofline2.m.