Why are some functions listed as not compatible with MATLAB Compiler, when they are in fact used and compilable in the Simulink Standard Library?

4 views (last 30 days)
For example,
set_param
is listed as not compatible with MATLAB Compiler (see here: https://fr.mathworks.com/help/compiler/unsupported-functions.html)
But it is used in the initialization mask of the Saturation Dynamic block, which is compatible with Simulink Compiler (successfully tested on my end).
How come?
My hypothesis is that the banned function is used during the initialization phase, therefore can be fully resolved during the compilation, and is not used during the runtime. Is that correct?
Thank you.

Accepted Answer

Steven Lord
Steven Lord on 3 Mar 2023
Some functions and functionality is supported with MATLAB Compiler but not Simulink Compiler.
Some functions and functionality is supported with Simulink Compiler but not MATLAB Compiler.
Some functions and functionality is supported with neither MATLAB Compiler nor Simulink Compiler.
See this page for a summary of what is supported by each product.
  1 Comment
Pierre-Augustin
Pierre-Augustin on 6 Mar 2023
I see, thank you. That would mean that the aforementioned function set_param is not compatible with MATLAB Compiler but can be compatible with Simulink Compiler - the documentation indicating which blocks are compatible.

Sign in to comment.

More Answers (0)

Categories

Find more on Simulink Functions in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!