MATLAB: Eliminating the warnings while creating standalone application in MATLAB App Designer

app designerstandalone application

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.

Best Answer

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.