this example shows how to create an instrumented mex function, run a test bench, then view logged results.
define prototype input arguments.
generate an instrumented mex function. use the -o
option to specify the mex function name. use the -histogram
option to compute histograms.
if you have a matlab® coder™ license, you can also add the -coder
option. in this case,
if you have a matlab® coder™ license, you can also add the -coder
option. for example,
buildinstrumentedmex testfft -coder -o testfft_instrumented -args {x,w}
like the fiaccel
function, the buildinstrumentedmex
function generates a mex function. to generate c code, use the matlab® coder™ codegen
function.
run a test file to record instrumentation results. use the showinstrumentedmex
function to open the report. to view the simulation minimum and maximum values and whole number status, pause over a variable in the report. you can also see proposed data types for double precision numbers in the table.
close the histogram display, then use the clearinstrumentationresults
function to clear the results log.
run a different test bench, then view the new instrumentation results.
to view the histogram for a variable, click the histogram icon in the variables tab.
close the histogram display, then use the clearinstrumentationresults
function to clear the results log.
clear the mex function.