| Simulink Reference | ![]() |
Syntax
Description
fixpt_interp1(xdata,ydata,x,xdt,xscale,ydt,yscale,rndmeth) implements a lookup table to find output(s) y for input(s) x. If x falls between two xdata values, then y is found by interpolating between the corresponding ydata pair. If x falls above the range given by xdata, y is given as the maximum ydata value. If x falls below the range given by xdata, y is given as the minimum ydata value.
If either the input data type, xdt, or the output data type, ydt, is floating point, then floating-point calculation is used to perform the interpolation. Otherwise, integer-only calculation is used. This calculation handles the input scaling, xscale, and the output scaling, yscale, appropriately, and obeys the designated rounding method, rndmeth.
Examples
Define xdata as a vector of 33 evenly spaced points between 0 and 8, and ydata as the sinc of xdata.
Now define your input x as a vector of 201 evenly spaced points between -1 and 9.
Notice that x includes some values that are both lower and higher than the range of xdata.
You can now use fixpt_interp1 to interpolate outputs for x.
See Also
fixpt_look1_func_approx, fixpt_look1_func_plot
| fixpt_evenspace_cleanup | fixpt_look1_func_approx | ![]() |
© 1994-2005 The MathWorks, Inc.