Shared Utility Functions for Prelookup Blocks
This example shows how Prelookup blocks share utility functions. The utility functions generated by the Prelookup block are determined by the target data type of the block's inputs, outputs, and breakpoint parameter, as well as the Index search method and Integer rounding mode. Even if the two Prelookup blocks have different input data type, output data type, and breakpoint data type, they use shared utility functions.
To see this in the generated code, open the model and build it.
open_system('fxpdemo_prelookup_utilfcn');
slbuild(bdroot(gcs));### Searching for referenced models in model 'fxpdemo_prelookup_utilfcn'. ### Total of 1 models to build. ### Starting build procedure for: fxpdemo_prelookup_utilfcn ### Successful completion of code generation for: fxpdemo_prelookup_utilfcn Build Summary Top model targets: Model Build Reason Status Build Duration =============================================================================================================== fxpdemo_prelookup_utilfcn Information cache folder or artifacts were missing. Code generated. 0h 0m 20.171s 1 of 1 models built (0 models already up to date) Build duration: 0h 0m 22.015s
