MATLAB Answers

m
0

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

Asked by m
on 15 Oct 2013
Latest activity Edited by Zack Peters on 25 Oct 2013
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.

  0 Comments

Sign in to comment.

1 Answer

Answer by Zack Peters on 25 Oct 2013
Edited by Zack Peters on 25 Oct 2013
 Accepted Answer

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

  0 Comments

Sign in to comment.