Fixed-Point Blockset    

Specifying Both errmax and nptsmax

If you include both the errmax and the nptsmax parameters, the function fixpt_look1_func_approx tries to find a lookup table with at most nptsmax data points, whose worst case error is at most errmax. If it can find a lookup table meeting both conditions, it uses the following order of priority for spacing:

  1. Power of two
  2. Even
  3. Unrestricted

If the function cannot find any lookup table satisfying both conditions, it ignores nptsmax and returns a lookup table with unrestricted spacing, whose worst case error is at most errmax. In this case, the function behaves the same as if the nptsmax parameter were omitted.

Using the parameters described the section Setting Function Parameters for the Lookup Table, the following examples illustrate the results of using different values for nptsmax when you enter

The results for three different settings for nptsmax are as follows:


  Example 6: Using nptsmax with Power of Two Spacing Comparing the Examples