Eliminating the warnings while creating standalone application in MATLAB App Designer

조회 수: 4 (최근 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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Assumptions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by