File Exchange

image thumbnail

Persistent Data for Lookup Tables in Simulink

version 1.3.0.0 (261 KB) by Jason Nicholson
How to speed up Simulink models that use large lookup tables.

1 Download

Updated 20 May 2018

View Version History

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Loading large lookup tables in Simulink models can be the bottle neck for the simulation speed. This is more important when you cannot load a lookup table into the base workspace or model workspace when you build a Simulink library. When you don't know how the library will be used, loading data into the base or model workspace can cause problems and thus it is bad practice to do so. This set of files shows how to load a lookup table in the mask initialization of a subsystem block and then save it to UserData. On subsequent runs, the data stored in UserData is used for the lookup table. The speed up is 10-50x.

The methodology will work in very old versions of MATLAB. However, the Simulink files attached are 2018a.

Cite As

Jason Nicholson (2021). Persistent Data for Lookup Tables in Simulink (https://www.mathworks.com/matlabcentral/fileexchange/67163-persistent-data-for-lookup-tables-in-simulink), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

xiao deng

Bradford Stricklin

Your example info was very informative.

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories

Community Treasure Hunt

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

Start Hunting!