- Using a MATLAB Function Block
- Write the model's mathematical equations directly in MATLAB code within the block. The code generation tool can then easily translate this into C code for the FMU.
- This method gives you full control and avoids any code generation issues with the original specialized block.
- he "Stateful Predict" block is part of the Deep Learning Toolbox, which is designed for robust code generation and FMU export. You can convert your trained model into a format that this block can use.
- The "Stateful Predict" block is specifically built for deployment and is known to work for FMU creation.