【问题标题】:Display functions used by GUI in MATLAB在 MATLAB 中显示 GUI 使用的函数
【发布时间】:2016-11-09 10:44:00
【问题描述】:

我在 MATLAB 中处理复杂的 GUI。
有没有一种快速的方法来跟踪和显示我正在使用的功能?

例如:
当我使用 GUI 并按下按钮或从菜单中选择字符串时,我想在命令窗口中显示 GUI 使用的所有功能。

【问题讨论】:

    标签: matlab function user-interface


    【解决方案1】:

    您可以使用Matlab profiler 跟踪GUI 调用的所有函数。只需按编辑器菜单中的运行和时间

    下面的代码可以打印出使用过的函数:

    p = profile('info')
    numEvents = size(p.FunctionHistory,2);
    for n = 1:numEvents
        name = p.FunctionTable(p.FunctionHistory(2,n)).FunctionName;
        disp([name]);
    end
    

    【讨论】:

      猜你喜欢
      • 2012-06-08
      • 2019-03-12
      • 2010-10-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-07
      • 1970-01-01
      • 2017-05-15
      相关资源
      最近更新 更多