Functions Not Supported for Compilation by MATLAB Compiler. What is the solution?

Hi,
I have gone through this article below and understood that Matlab doesn't support these functions after the compilation (standalone desktop app).
But what is the solution? Does that mean that if I have these functions in my app, then I cannot compile it at all?

 Réponse acceptée

You would need to use isdeployed() to prevent those functions from being called in the compiled version of your application.
If your application depends on the functionality then you will need to write the functionality some other way. Sometimes that is fairly easy, sometimes it is a lot of work

3 commentaires

Vish
Vish le 9 Mai 2023
Modifié(e) : Vish le 9 Mai 2023
Thanks for your answer. Indeed the application depends upon those functions. I was trying to change the Simulink configuration properties of cascaded Simulink models. It works fine in the Matlab code but I couldn't make it work in the when it was compiled. The compiler compiles it but when I try to use the app, it shows the following statements in the log file.
Undefined function 'open_system' for input arguments of type 'char'.
Historically you had to use Simulink Coder, but I gather that recently Application Builder began to handle some mixes of MATLAB and Simulink. I believe that requires a newer release than you are using.
Thanks for the input. I am currently using 2021b, but I will try checking with the newer versions if it helps.

Connectez-vous pour commenter.

Plus de réponses (1)

There is a lot more than that. In general, applets cannot be compiled also, for example ColorThresholder or other applets on the Apps tab of the tool ribbon. You'd have to write something yourself. What function, specifically, were you trying to include?

1 commentaire

Thanks for your answer. I was mainly looking for the following functions:
get_param
set_param
open_system
Couldn't find any alternatives so far.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Simulink Coder dans Centre d'aide et File Exchange

Produits

Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by