主要内容

clearInstrumentationResults

清晰的结果记录通过仪器,编译C代码功能

语法

clearInstrumentationResults(“mex_fcn”)
clearInstrumentationResultsmex_fcn
clearInstrumentationResults所有

描述

clearInstrumentationResults(“mex_fcn”)清除调用检测过的MEX函数所记录的结果mex_fcn

clearInstrumentationResultsmex_fcn是清除日志的替代语法。

clearInstrumentationResults所有清除所有测量的MEX函数的结果。

输入参数

mex_fcn

仪表MEX功能创建使用buildInstrumentedMex

例子

运行一个测试台来记录测试,然后使用clearInstrumentationResults清除日志。

  1. 创建一个临时目录,然后从Fixed-Point Designer™导入一个示例函数。

    tempdirObj = fidemo.fiTempdir (showInstrumentationResults)复制文件(fullfile (matlabroot,“工具箱”,“定点”,…“fidemos”、“fi_m_radix2fft_withscaling.m”),……“testfft.m”、“f”)
  2. 定义原型输入参数。

    n = 128;x =复杂(fi (0 (n, 1),“数据类型”、“ScaledDouble”));W = coder.Constant (fi (fidemo.fi_radix2twiddles (n)));
  3. 生成一个仪表化的MEX函数。使用- o选项指定MEX函数名。

    testfft_instrumented -args {x,W}
  4. 运行一个测试台来记录测试结果。调用showInstrumentationResults打开报告。通过暂停报告中的一个变量来查看模拟的最小值和最大值以及整数状态。

    For i=1:20 y = testfft_instrumented(cast(2*rand(size(x))-1,'like',x));结束showInstrumentationResults testfft_instrumented

  1. 清除结果日志。

    clearInstrumentationResults testfft_instrumented
  2. 运行一个不同的测试台,然后查看新的测试结果。

    For i=1:20 y = testfft_instrumented(cast(rand(x))-0.5,'like',x));结束showInstrumentationResults testfft_instrumented

  3. 清除MEX函数并删除临时文件。

    清楚testfft_instrumented;tempdirObj.cleanUp;
介绍了R2011b