"Lookup Table Dynamic" block not updating when table values are changed inside a triggered function
이전 댓글 표시
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

채택된 답변
추가 답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Lookup Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!