Fixed-Point Blockset    

Example 3: Using errmax with Even Spacing

The next example shows how to create a lookup table that has evenly spaced breakpoints and a specified worst case error. To try the example, you must first enter the parameter values given in the section Setting Function Parameters for the Lookup Table, if you have not already done so in this MATLAB session.

Next, at the MATLAB prompt type

You can find the number of points in the lookup table by typing length(xdata).

To plot the lookup table along with the errors, type

This produces the following plots.


  Example 2: Using nptsmax with Unrestricted Spacing Example 4: Using nptsmax with Even Spacing