Purpose or effect of "Use last table value for inputs at or above last breakpoint"?

10 visualizaciones (últimos 30 días)
In the lookup table blocks in Simulink there is the option to clip rather than extrapolate, when this option is selected the option "Use last table value for inputs at or above last breakpoint" appears. What is the purpose of this option? I looked at the documentation and and the way it is described the block should use the end breakpoint value regardless of whether the box is checked (bp(end) with f = 0 or bp(end-1) with f = 1 result in the same value). I also did a simulation and the output of the lookup with input exceeding the last breakpoint is the same to long precision with or without this box checked.

Respuesta aceptada

Zack Peters
Zack Peters el 25 de Oct. de 2013
Editada: Zack Peters el 25 de Oct. de 2013
The two options produce the same results. The only difference being how the results are being computed internally. Some users prefer to have high customization on their generated code when using Simulink Coder or Embedded Coder; this option provides the ability to do so.
There are situations that can arise when using fixed-point data types where you can obtain different results, but if you are obtaining different or unexpected results then you would probably want to reconsider the fraction and word length of your fixed-point data types.
If you are receiving the same results and are either not performing any code generation on your model then I would ignore this option and just go along with whichever you feel most comfortable with
~Zack

Más respuestas (0)

Categorías

Más información sobre Lookup Tables en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by