MATLAB 2017b introduced support for the Functional Mock-up Standard by providing FMU-import blocks in Simulink. This open standard enables mixing of simulation models created with different tools, like prototype controllers before coding them. This is an extremely powerful feature that I will write more about in soon. This memo, however, is about an error that occurred to me when importing an FMU in Simulink and how to fix it.
The error is something like:
Error parsing FMU <fmu-name>. Caused by:
Error in supplied FMU: Dynamic library file <lib-file> does not exist in FMU <fmu-name>.
Papers and reports can’t do without both but integrating MATLAB figures in LaTeX is not so obvious. Different methods for exporting and including graphics exist but have various downsides like inconsistent scaling, wrong fonts and strange spacing. The best method I have come across so far is using matlab2tikz. It is a MATLAB script that is able to extract all relevant details out of a figure and convert it to PGFPlots (a LaTeX package).