GUI Deployed into EXE is not working propaply

2 views (last 30 days)
Hi Everyone,
I used the deploytool command to build a stand alone application (EXE),
The GUI is working well, but the EXE file doesn't work completely.
The problem occures when I use the button that performs the following commands:
syms T
fun1=(b(1)*T+(b(2)/2)*T^2+(b(3)/3)*T^3+(b(4)/4)*T^4+(b(5)/5)*T^5+b(6))*(8314/Mw)-handles.metricdata.Enthalpy;
f1=inline(fun1);
fun2=(a(1)*T+(a(2)/2)*T^2+(a(3)/3)*T^3+(a(4)/4)*T^4+(a(5)/5)*T^5+a(6))*(8314/Mw)-handles.metricdata.Enthalpy;
f2=inline(fun2);
z1=diff(fun1); % = Cp 1st species for T<1000
z2=diff(fun2); % = Cp 1st species for T>1000
f3=inline(z1);
f4=inline(z2);
T0= str2double(get(handles.text6,'string'));
T=T0;
for i=0:inf %Newton Raphson Method
x=T;
if T<1000
T=x-(f1(T)/f3(T));
else
T=x-(f2(T)/f4(T));
end
if abs(x-T)<0.001 %Tolerence
break
end
end
I Think the problem is in the For loop that extends from 1:inf!!
Because its too large, but it works well in the GUI file!!
Any help is appreciated.
Mohamed Selim
  5 Comments
muhammad asif
muhammad asif on 21 Mar 2021
what wo do to make standalone app for code contains 'syms' is there any alternate solution
Walter Roberson
Walter Roberson on 24 Mar 2021
what wo do to make standalone app for code contains 'syms' is there any alternate solution
Yes, if you look around, you can find C++ projects to do symbolic computation that you could link to from your MATLAB code. The facilities offered by the projects varies a lot. For example some of them only offer basic extended precision addition subtraction multiplication division, and trig and logarithms, but others have some degree of calculus or linear algebra.
However, you will not find the full MATLAB Symbolic Toolbox, and there is no possibility at this time of convincing Mathworks products to compile functions from the Symbolic Toolbox.
As I wrote above,
"You should use a program to calculate the formula symbolically, and you should use matlabFunction() with the output file option to have it write a file of MATLAB code that implements the formula in non-symbolic form. Then your compiled GUI would call upon those function files, never using the symbolic toolbox itself."

Sign in to comment.

Accepted Answer

Sean de Wolski
Sean de Wolski on 4 Oct 2012
The Symbolic Math Toolbox cannot be deployed:

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!