Skip to Main Content Skip to Search
Product Documentation

clearInstrumentationResults - Clear results logged by instrumented MEX function

Syntax

clearInstrumentationResults('mex_fcn')
clearInstrumentationResults mex_fcn
clearInstrumentationResults all

Description

clearInstrumentationResults('mex_fcn') clears the results logged from calling the instrumented MEX function mex_fcn.

clearInstrumentationResults mex_fcn is alternative syntax for clearing the log.

clearInstrumentationResults all clears the results from all instrumented MEX functions.

Input Arguments

mex_fcn

Instrumented MEX function created using buildInstrumentedMex.

Examples

Run a test bench to log instrumentation, then use clearInstrumentationResults to clear the log.

  1. Create a temporary directory, then import a demo function from Fixed-Point Toolbox.

    tempdirObj=fidemo.fiTempdir('showInstrumentationResults')
    copyfile(fullfile(matlabroot,'toolbox','fixedpoint',...
       'fidemos','fi_m_radix2fft_withscaling.m'),...
       'testfft.m','f')
  2. Define prototype input arguments.

    n = 128;
    x = fi(zeros(n,1);
    W = coder.Constant(fi(fidemo.fi_radix2twiddles(n));
  3. Generate an instrumented MEX function. Use the -o option to specify the MEX function name.

    buildInstrumentedMex testfft -o testfft_instrumented -args {x,W}
  4. Run a test bench to record instrumentation results. Call showInstrumentationResults to open the Code Generation Report. View the simulation minimum and maximum values and whole number status by hovering over a variable in the report.

    for i=1:20
        y = testfft_instrumented(randn(size(x)));
    end
    
    showInstrumentationResults testfft_instrumented

  1. Clear the results log.

    clearInstrumentationResults testfft_instrumented
  2. Run a different test bench, then view the new instrumentation results.

    for i=1:20
       y = testfft_instrumented(randn(size(x)));
    end
    
    showInstrumentationResults testfft_instrumented

  3. Clear the MEX function and delete temporary files.

    clear testfft_instrumented;
    tempdirObj.cleanUp;

See Also

buildInstrumentedMex | codegen | fiaccel | mex | showInstrumentationResults

  


Free Early Verification Kit

Learn how to apply early verification to your development process through these technical resources.

How much time do you spend on testing to ensure implementation meets system-level requirements?

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS