MATLAB能否将Profiler结果表(函数名,调用等)保存为文本文件或电子表格?

3次浏览(过去30天)
MATLAB能否将Profiler结果表(函数名,调用,总时间,自我时间)保存为文本文件或电子表格?
我需要这个来合并和比较来自不同软件版本的Profiler结果。
15个评论

登录评论。

接受的答案

我J
我J 2022年3月1日
信息=负载(“info.mat”)信息;
infotab = struct2table(info.FunctionTable);
infotabMain = infotab(:, [“FunctionName”“我会”“TotalTime”“TotalRecursiveTime”]);%配置文件查看器中的主表
infotabExc = cell(height(infotab), 1);每个子函数的%执行时间
I = 1:height(infotab)
infotabExc{i} = infotab.ExecutedLines{i};
infotabExc{i} = array2table(infotabExc{i},...
“VariableNames”, {“行号”“电话”“总时间(s)”});
结束

更多答案(2)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2022年2月21日
编辑:Sulaymon Eshkabilov 2022年2月21日
是的,使用profsave(profile())可以非常容易地完成,例如:
配置文件
X = linspace(0,1, 2e3);
Y = sin(2* *t)+randn(size(x));
情节(x, y),网格
配置文件
所有的html文件都保存在当前目录和一个名为MY_Profile_results的文件夹中
profsave(配置文件(“信息”),“MY_Profile_Results”

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2022年2月21日
你可以试试这个fcn - extracthmltext () 从HTML格式的文件中提取数据:
//www.tatmou.com/help/textanalytics/ref/htmltree.extracthtmltext.html

下载188bet金宝搏


释放

R2017b

社区寻宝

在MATLAB Central中找到宝藏,并发现社区如何帮助您!

开始狩猎!