Purpose or effect of "Use last table value for inputs at or above last breakpoint"?
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Zack Peters
le 25 Oct 2013
Modifié(e) : Zack Peters
le 25 Oct 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
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Lookup Tables dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!