Problem with Matlab Standalone Application

Good morning to everyone.
I have developed an application in Matlab appdesigner but unfortunately at the time of exporting it as a desktop application, it doesn't work properly and I think it's because it's not exporting certain functions ("cell2sym, solve, str2sym, subs, syms") that I use in my code. How could I fix it? Make use of those functions frequently in my code. Thank you !
mcc -o ShaftDesign -W 'WinMain:ShaftDesign,version=1.0' -T link:exe -d D:\Programs\Matlab\AppDesigner\Tesina3_1\for_testing -v D:\Programs\Matlab\AppDesigner\Tesina2.mlapp -r 'C:\Program Files\Polyspace\R2020a\toolbox\compiler\resources\default_icon.ico'
Compiler version: 8.0 (R2020a)
Dependency analysis by REQUIREMENTS.
Warning: In "D:\Programs\Matlab\AppDesigner\Tesina2.mlapp", "cell2sym, solve, str2sym, subs, 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 "D:\Programs\Matlab\AppDesigner\Tesina2.mlapp"
(referenced from command line).
Generating file "D:\Programs\Matlab\AppDesigner\Tesina3_1\for_testing\readme.txt".
Packaging...
Creating the bundle...
Creating the install agent URL file...
Web based installer created at D:\Programs\Matlab\AppDesigner\Tesina3_1\for_redistribution\MyAppInstaller_web.exe.
Packaging complete.
Elapsed packaging time was: 46 seconds.

 Accepted Answer

Symbolic Toolbox can never be compiled.

7 Comments

Excuse me, one question more, maybe in the New Matlab's versions (2021 2022 2023...) Will it be possible?
Mathworks does not tell me what their plans are for the Symbolic Toolbox, so I do not know (and if I did know I would probably be under Non-Disclosure Agreement.)
What I can say is that the trend of development for the Symbolic Toolbox interface is consistent with the hypothesis that Mathworks might be planning to replace the MuPAD symbolic engine with something else. And who knows what that would be like?
Hi Walter !
I have read the answer you gave to a user who had the same problem, and like his comment, I find your explanation of a possible solution to this problem a bit complex. But what I think I could understand, is that if the system of equations can be defined manually by the user and it is also static, it is possible to correct the problem through the division of the calculation process. However, I believe that the system of equations, in my case, is dynamic since it grows according to the parameters entered by the user and it would be very counterproductive for the user to define them manually since it is difficult and would take a lot of time. This makes my program different from other programs that are very limited, as they only include a few cases of calculation. I was looking forward to sharing my program with my colleagues because it is very didactic. I guess I will have to wait until Matlab can join RunCompiler with Symbolic Toolbox. Thank you very much for your answer and your time!
Suppose you had a situation in which you had a fixed list of design elements that the user could use. Say, for example, plus(), minus(), times(), divide(), sqrt(), power(), sin(), cos() . You could then create a user interface that permitted the user to put together trees of those -- you could even do some string parsing to analyze a user input phrase that was limited to operations you had determined in advance. You could use these elements and build a data structure that held a chain of function handles and operand references. And you could build a function that evaluated that data structure chain down to a numeric value.
Given those elements... you could fsolve() a wide range of user-configured formulas, without needing to use the symbolic toolbox.
You would not be able to use this approach if the desired output was a symbolic solution. The approach would also be weak on finding "all" solutions. The approach would not user-entered differential equations (technically you can pass a differential equation to solve() instead of dsolve()). Also, every permitted call would have to be configured in advance.
If you needed the full power of mathematic operations available through the symbolic toolbox without having to configure them all in advance -- if you want the user to be able to enter any arbitrary valid symbolic expression that interactive MATLAB could handle, if you want to be able to use the full power of calculus -- then you would not be able to use this approach.
Hello again!
Maybe you can tell me if there is a possibility that I can apply the solution you propose, in my app.
As you can see, this is the interface of my program, and it only admits numerical values by the user, from which, by means of my algorithm, a series of equations are generated.
These equations (generally a lot of equations) need to be integrated twice, so I generate two constants (for each equation, which I add them with "SYM", since the "INT" function does not generate them automatically) that I have to calculate, through of a large equations' system(here I use "SOLVE"). Once the values of these constants are calculated, they need to be replaced in their original functions, because then I will have to plot them with "FPLOT" through cycles, because as I mentioned before, my program is dynamic and adapts to all possible calculation cases that the user can define and want to solve.
All this process, which is a summary in fact, is necessary for the calculation of main efforts on power transmission shafts, which is the objective of my program and is a very important issue in the design of machine elements. The manual calculation is very tedious and extensive, so sometimes I use approximations that facilitate the calculation but add errors in the results, that's why I have been working a lot on this project. Thanks for responding!
Is it not posiible for it to run an App with functions from Symbolic toolbox through the Matlab Web App Server?

Sign in to comment.

More Answers (0)

Products

Release

R2020a

Community Treasure Hunt

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

Start Hunting!