Fixed-Point Blockset    
fixpt_look1_func_plot

Plot a function with x values generated by the fixpt_look1_func_approx function

Syntax

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 for a tutorial on using the function fixpt_look1_func_plot. For an example of the function, see the reference page for the fixpt_look1_func_approx function.

See Also

fixpt_look1_func_approx


  fixpt_look1_func_approx fixpt_restore_links