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:

  1. Create a fixed-point configuration object and configure the test file name.

    fixptcfg = coder.config('fixpt');
    fixptcfg.TestBenchName = 'dti_test';

  2. 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;
  3. Generate fixed-point MATLAB code using fiaccel.

    fiaccel -float2fixed fixptcfg dti

For an example, see Propose Data Types Based on Derived Ranges.