MATLAB 帮助中心
进行代码节执行时间测量的时间端(MATLAB 代码生成)
Time = NthSectionProfile.Time
Time = NthSectionProfile.Time 返回时间向量,该向量对应于测量代码节执行时间的时间段。
Time
NthSectionProfile
示例
全部折叠
打开此示例以获取本教程的文件:
kalman01.m - 卡尔曼估计器的 MATLAB® 函数
kalman01.m
test01_ui.m - 要测试 kalman01.m 的 MATLAB 文件
test01_ui.m
plot_trajectory.m - 绘制实际目标轨迹和卡尔曼估计器输出的文件
plot_trajectory.m
position.mat - 输入数据
position.mat
openExample('ecoder/KalmanFilterExample')
设置并运行 SIL 执行。
config = coder.config('lib'); config.GenerateReport = true; config.VerificationMode = 'SIL'; config.CodeExecutionProfiling = true; codegen('-config', config, '-args', {zeros(2,1)}, 'kalman01'); coder.runTest('test01_ui', ['kalman01_sil.' mexext]);
执行结束时,您会看到以下消息。
To terminate execution: clear kalman01_sil Execution profiling report available after termination.
点击链接 clear kalman01_sil。
clear kalman01_sil
### Stopping SIL execution for 'kalman01' Execution profiling report: report(getCoderExecutionProfile('kalman01'))
创建一个保留执行时间数据的工作区变量。
executionProfile=getCoderExecutionProfile('kalman01');
获取第二个代码节的配置文件。
secondSectionProfile = executionProfile.Sections(2);
获取代码节的时间向量。
time = secondSectionProfile.Time;
coder.profile.ExecutionTimeSection
由 coder.profile.ExecutionTime 属性 Sections 生成的对象。
coder.profile.ExecutionTime
Sections
对代码节进行测量的时间段(秒)。以向量形式返回。
在 R2013a 中推出
getCoderExecutionProfile | Sections | ExecutionTimeInTicks | ExecutionTimeInSeconds
getCoderExecutionProfile
ExecutionTimeInTicks
ExecutionTimeInSeconds
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处