Borrar filtros
Borrar filtros

Lookup table code generation

5 visualizaciones (últimos 30 días)
Macko
Macko el 20 de Jun. de 2012
Hi,
I'd like to use 1-D lookup tables in my model and have Embedded Coder generate custom code out of it (legacy algorithm library). How would I go about it?
Generating code from the model would result in something like this:
LookUp_U8_U8( &(rtb_LookupTableC2), Subsystem_P.LookupTableC2_YData, myOtherGlobalInputVariable, Subsystem_P.LookupTableC2_XData, 4U);
What I would need would be something like this:
currentValue=myLookupFunction(blockInputValue,&xValueTable,,&yValueTable,numberOfInterpolationPoints);
Any suggestion is greatly appreciated! Thank you!

Respuesta aceptada

TAB
TAB el 20 de Jun. de 2012
To generate the the function call as you have shown, you can use s-function and it's in-lining TLC file. There is no need to write s-function manually. You can easily generate S-function and it's inlining TLC file using S-function builder or using Legacy code tool.
For your requirement Legacy code tool is best suitable.
  2 comentarios
Macko
Macko el 21 de Jun. de 2012
Thank you, TAB! I think this might be the right way to go!
TAB
TAB el 23 de Jun. de 2012
Macko, Please accept this answer.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by