Eliminating the warnings while creating standalone application in MATLAB App Designer

10 ビュー (過去 30 日間)
Hi,
I am new to MATLAB App Designer. I tried to create a standalone appilcation. After packaging, in the log file, the following warnings came out:
Warning: In "C:\Users\furka\Documents\MATLAB\BazantD.m", "syms" are excluded from packaging for the MATLAB Runtime environment according to the MATLAB Compiler license. Either remove the file or function from your code, or use the MATLAB function "isdeployed" to ensure the function is not invoked in the deployed component.
Warning: In "C:\Users\furka\Documents\MATLAB\BazantG.m", "syms" are excluded from packaging for the MATLAB Runtime environment according to the MATLAB Compiler license. Either remove the file or function from your code, or use the MATLAB function "isdeployed" to ensure the function is not invoked in the deployed component.
Warning: In "C:\Users\furka\Documents\MATLAB\Version45.mlapp", "int, syms" are excluded from packaging for the MATLAB Runtime environment according to the MATLAB Compiler license. Either remove the file or function from your code, or use the MATLAB function "isdeployed" to ensure the function is not invoked in the deployed component.
Parsing file "C:\Users\furka\Documents\MATLAB\Version45.mlapp"
(referenced from command line).
Due to elimination of these, my app is not working very well. How can I eliminate those warnings in order to function my app?
ps: I am using R2020a version.

採用された回答

Walter Roberson
Walter Roberson 2020 年 5 月 15 日
Nothing in the Symbolic Toolbox can be compiled into an exe or application, and it also cannot have code generated using MATLAB Coder .
Your use of int() tells us that you are trying to generate new equations inside the compiled application. You cannot do that.
The work-around is to split the program into two pieces.
One piece will be run interactively, and will generate the equations. Then in that interactive version, use matlabFunction() with 'File' option to write to a .m file. The generated .m will be purely numeric -- including having transformed int() into integral() if necessary.
The second piece is the one that will be compiled. It will refer to the .m that you wrote into, which has the pure numeric function, and so will be able to compile it.
If you wanted to change the equation, you would have to go back to the interactive version and generate a new .m file.
  9 件のコメント
Walter Roberson
Walter Roberson 2024 年 2 月 24 日
No, you cannot do that.
Even if you managed to convert the string to a function, you would run into the problem that indefinite integration is part of the Symbolic Toolbox, and nothing in the Symbolic Toolbox can be compiled.
The closest you would be able to get would be to have an interactive program that accepted equations and found their indefinite integral and saved the equations and the indefinite integrals to files. Then the compiled application would read the files of saved equations and saved indefinite integrals, give a menu of saved equations, and pull out the corresponding pre-saved indefinite integrals.
Edwin
Edwin 2024 年 2 月 25 日
Thanks for your answer

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Code Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by