Main Content

探查器

运行代码并测量执行时间以改善性能

说明

探查器使您能够以交互方式探查代码。通过探查,可以测量运行代码所需的时间和确定 MATLAB® 在哪些位置最耗时。在确定哪些函数耗用大部分时间后,您可以对它们进行评估以确定可能的性能改进。您还可以探查您的代码以确定哪些代码行不运行。确定哪些代码行不运行在为代码开发测试时很有用,也可以作为调试工具来帮助隔离代码中的问题。

Profiler app showing the results from profiling the solvelotka function. The Profiler app shows the results using both a flame graph and a table containing the list of functions called with the times each function took to run.

打开 探查器 App

  • MATLAB 工具条:在 App 选项卡上的 MATLAB 下,点击 App 图标。

  • MATLAB 命令提示符:输入 profile viewer

版本历史记录

在 R2006a 之前推出

另请参阅

|