MATLAB能否将Profiler结果表(函数名,调用等)保存为文本文件或电子表格?
3次浏览(过去30天)
显示旧的注释
接受的答案
我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)”});
结束
0评论
更多答案(2)
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
2022年2月21日
你可以试试这个fcn -
extracthmltext ()
从HTML格式的文件中提取数据:
//www.tatmou.com/help/textanalytics/ref/htmltree.extracthtmltext.html