"Lookup Table Dynamic" block not updating when table values are changed inside a triggered function
Show older comments
Hello,
I am having an interesting issue with the "Lookup Table Dynamic" block. I am trying to change the ydata vector of the lookup table from within a triggered function. The table output does not appear to be updating in the simulation. I have attached an example that demonstrates the problem, and an image that illustrates the example.
In the example, the model simTRIGGERED is executed repeatedly. This model runs function funTRIGGERED, from which I modify the values of the table's ydata vector. This is done through variables in the global struct "data". I expected that because the lookup table is "dynamic," it would automatically update its ydata as the data.y_table is changed. However, the scope ("Scope1") shows that the table's output does not change. But, when the plot() function is used, it looks like the data.y_table vector actually was changed.
Why is the dynamic lookup table not updating while the simulation runs? Is there some problem with how my simulation/functions are organized?
Best Regards, James

Accepted Answer
More Answers (1)
Categories
Find more on Lookup Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!