fixpt_look1_func_plot - Plot function with x values generated by fixpt_look1_func_approx function

Syntax

errworst = fixpt_look1_func_plot(xdata,ydata,'funcstr',
    xmin,xmax,xdt,xscale,ydt,yscale,rndmeth)

Description

fixpt_look1_func_plot(xdata,ydata,'funcstr',xmin,xmax,xdt,xscale, ydt,yscale,rndmeth) plots a lookup table approximation function and its error from the ideal function. You can use the fixpt_look1_func_approx function to generate xdata and ydata, the x and y data points for the lookup table. The function returns the maximum absolute error as a variable errworst. The inputs are as follows.

Input

Value

xdata

x values for the lookup table

ydata

y values for the lookup table

'funcstr'

Function of x

xmin

Minimum input of interest

xmax

Maximum input of interest

xdt

Data type of x

xscale

Scaling for the x values

ydt

Data type of y

yscale

Scaling for the y values

rndmeth

Rounding mode supported by the blockset: 'Toward Zero', 'Nearest', 'Floor', 'Ceiling'

The fixpt_look1_func_approx function applies the ideal function to the points in xdata to produce ydata. While this is the easiest way to generate ydata, you are not required to use these values for ydata as input for the fixpt_look1_func_approx function. Choosing different values for ydata can, in some cases, produce a lookup table with a smaller maximum absolute error.

See Tutorial: Producing Lookup Table Data in Simulink® Fixed Point™ User's Guide for a tutorial on using fixpt_look1_func_plot. For an example of the function, see fixpt_look1_func_approx function.

See Also

fixpt_look1_func_approx

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS