Main Content
Enable Plotting Using the Simulation Data Inspector
You can use the Simulation Data Inspector to inspect and
compare floating-point and fixed-point input and output data logged using the fiaccel
function. At the MATLAB® command line:
Create a fixed-point configuration object and configure the test file name.
fixptcfg = coder.config('fixpt'); fixptcfg.TestBenchName = 'dti_test';
Select to run the test file to verify the generated fixed-point MATLAB code. Log inputs and outputs for comparison plotting and select to use the Simulation Data Inspector to plot the results.
fixptcfg.TestNumerics = true; fixptcfg.LogIOForComparisonPlotting = true; fixptcfg.PlotWithSimulationDataInspector = true;
Generate fixed-point MATLAB code using
fiaccel
.fiaccel -float2fixed fixptcfg dti
For an example, see Propose Data Types Based on Derived Ranges Using the fiaccel Function.