主要内容

showInstrumentationResults

结果记录仪,编译C代码功能

语法

showInstrumentationResults ('mex_fcn')
showInstrumentationResults ('mex_fcn“- - - - - -选项')
showInstrumentationResultsmex_fcn
showInstrumentationResultsmex_fcn选项

描述

showInstrumentationResults ('mex_fcn')打开代码生成报告,显示调用检测过的MEX函数的结果mex_fcn.将鼠标悬停在报表中的变量和表达式上,将显示记录的信息。记录的信息包括最小值和最大值、建议的分数或字长、当前范围的百分比,以及该值是否总是一个整数,这取决于您指定的选项。如果您指定将它们包含在buildInstrumentedMex函数,直方图也包括在内。在Variables选项卡的汇总表中显示相同的信息。

showInstrumentationResults ('mex_fcn“- - - - - -选项')指定代码生成报告的检测结果部分的选项。

showInstrumentationResultsmex_fcnshowInstrumentationResultsmex_fcn选项是打开代码生成报告的可选语法。

当你打电话showInstrumentationResults,该文件名为仪表/mex_fcn/ html / index . html被创建。mex_fcn是相应的仪表MEX函数的名称。选择此文件将打开基于web的代码生成报告版本。从MATLAB中打开此文件®,右键单击该文件并选择外开放的MATLABshowInstrumentationResults如果检测到的mex_fcn还没有被调用。

输入参数

mex_fcn

仪表MEX功能创建使用buildInstrumentedMex

选项

测量结果的选择。

-defaultDTT 建议双或单数据类型输入的默认数据类型,其中T是numerictype对象或下列对象之一:“remainFloat”“双”“单一”“int8”“int16”“int32”“int64”“uint8”“uint16”“uint32”,或“uint64”.如果指定int使用uint,则符号和字长为int使用uint值和分数长度的建议。默认值是remainFloat,它没有提出任何数据类型。
-nocode

不要在可打印的报告中显示MATLAB代码。只显示记录变量的表。此选项只有与可打印的选择。

-optimizeWholeNumbers

优化变量的字长,这些变量的模拟最小/最大日志表明它们总是整数。

-percentSafetyMarginN

模拟的安全裕度最小/最大,其中N是一个百分比值。

可打印的

创建并打开一个可打印的HTML报告。报告在系统浏览器中打开。

-proposeFL

为指定的字长建议分数长度。

-proposeWL

为指定的分数长度建议单词长度。

例子

生成一个测试过的MEX函数,然后运行一个测试台。调用showInstrumentationResults打开代码生成报告。

请注意

记录的结果来自showInstrumentationResults是对已插装的MEX函数的所有以前调用的累加。要清除日志,请参见clearInstrumentationResults

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

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

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

    buildInstrumentedMextestfft- otestfft_instrumented...arg游戏{x, W}柱状图
  4. 运行一个测试台来记录测试结果。调用showInstrumentationResults打开报告。通过暂停报告中的一个变量,可以查看模拟的最小值和最大值、建议的分数长度、当前范围的百分比和整数状态。

    I =1:20 x(:) = 2*rand(size(x))-1;y = testfft_instrumented (x);结束showInstrumentationResultstestfft_instrumented...-proposeFL-percentSafetyMargin10

  1. 通过单击查看变量的直方图变量选项卡。

    有关图表的信息,请参阅NumericTypeScope参考页面。

  2. 关闭直方图显示,然后清除结果日志。

    clearInstrumentationResultstestfft_instrumented
  3. 清除MEX函数,然后删除临时文件。

    清晰的testfft_instrumented;tempdirObj.cleanUp;
介绍了R2011b